Commits

Jan Lahoda  committed c0d75fb

When escaping & and <, must replace all occurrences, not only the first one

  • Participants
  • Parent commits 73d8ec0

Comments (0)

Files changed (1)

File remoting/server/web/web.ui/src/org/netbeans/modules/jackpot30/backend/ui/showCode.html

             var $spans = [${spans}];
             var $current = 0;
             for (var i = 0; i < $highlights.length; i++ ) {
-                $codeEl.append($('<a id="p' + $current + '"><span class="' + $highlights[i] + '"' + ($highlights[i].indexOf("identifier") !== (-1) ? ' onclick="ic(' + $current + ')"' : '') + '>' + $code.slice($current, $current+$spans[i]).replace('&', '&amp;').replace('<', '&lt;') + "</span></a>"));
+                $codeEl.append($('<a id="p' + $current + '"><span class="' + $highlights[i] + '"' + ($highlights[i].indexOf("identifier") !== (-1) ? ' onclick="ic(' + $current + ')" jpt30pos="' + $current + '"' : '') + '>' + $code.slice($current, $current+$spans[i]).replace(/&/g, '&amp;').replace(/</g, '&lt;') + "</span></a>"));
                 $current += $spans[i];
             }