0

Context:

An HTML list is not rendering an <img> tag inside an <a> tag when the div that is before these tags has chinese/japanese/korean chars.

Here is the sample code:

<LI style="DISPLAY: block" id=participantList_10025_li>
    <DIV id=participantList_10025_div class=tree-node>
        <SPAN id=participantList_10025 class="node-parent node-close" onclick=handleParticipantListClick(event);></SPAN>&nbsp;
        <SPAN class="node-type-image participantListImage"></SPAN>&nbsp;
        <SPAN class=node-name><A id=companyId_10025 href="#">Albinooooo</A><SPAN class=sharing-info>共有:母公司跟部门</SPAN></SPAN>
        <DIV class=options>
            <A id=mlink-supplierMenu_10025-10025 class="hoverText optionMenuLinkInADiv" onmouseover="showmenu(event, elMenuMap['participantList_mlink-supplierMenu_10025-10025'])" onmouseout=delayhidemenu() href="javascript:void(0)">
                <IMG id=img_participantList_10025 class=options border=0 src="http://localhost:8080/app/image/options.gif">
            </A>
        </DIV>
    </DIV>
</LI>

A print screen of the issue x normal behavior: enter image description here

As you can see, in the right version of the image, I added a 'a' char in the screen and the img was displayed.

A workaround:

Since I noticed it happens just because of the double byte chars, I added a &nbsp; after the names are written, and then the img icon is displayed again.

I'm still curious why it happens, and since the &nbsp; adds this space, I wanted to know if someone had a similar issue and how fixed it (possible causes). (also this is only happening in IE browsers).

periback2
  • 1,459
  • 4
  • 19
  • 36
  • Essential information is missing: the actual character encoding, and the declaration(s) of the character encoding. You should also reduce the problem to a simple case if possible. The odds are that all the markup and JavaScript code here are irrelevant to the problem. Check what happens if you have just an HTML file containing the CJK characters. – Jukka K. Korpela Mar 06 '14 at 15:33
  • Jukka.. I already did several tests.. when I add a question here, I'm punctual... if I replace the chinese chars "共有:母公司跟部门" for "Test", it works... I only added essential code. This is a IE only problem and it's related the double byte chars, but I have no idea what can be possibly causing it (reason why I'm asking here.. I don't even know how to search for it anymore..) – periback2 Mar 06 '14 at 15:45
  • What we need is a description that makes it possible to actually reproduce the problem. You have not addressed any of the points I made in my first comment. – Jukka K. Korpela Mar 06 '14 at 17:05
  • 1
    It's a huge system with legacy code. I'm not a QA reporting a bug. I'm a developer trying to describe a weird situation I couldn't find nothing similar in my searchs.. You are not forced to help me... if you don't know, just don't answer it.. it's simple.. I'm asking it here since there may be others who have experienced the same problems.. for those, they might have an idea... I found that the problem is due to the double-byte chars. I found a workaround that may be useful for others. I want to know if someone knows the root cause of it. – periback2 Mar 06 '14 at 17:26
  • I'll probably leave a link to this answer in the jira ticket where I fixed this bug with my workaround. In the future, there may be an answer here and it can help others to understand this weird situation. – periback2 Mar 06 '14 at 17:29

0 Answers0