Forum > Lazarus Extra Components

TIpHtmlPanel bug introduced after version 1.8.5

<< < (2/2)

wp:
Sorry for being inaccurate. Whenever the scanner finds an opening html comment tag ('<!-') it ignores everything until the closing tag is found.

Excerpt from TIpHtmlPanel.NextToken:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---    if Ch = '<' then begin      Ch := GetChar;      if Ch = '!' then begin        if GetChar = '-' then begin          if GetChar <> '-' then            if FlagErrors then              ReportError(SHtmlDashExp);          Ch := GetChar;          repeat            while Ch <> '-' do begin              if Ch = #0 then                break;              Ch := GetChar;            end;            if (Ch = #0) then              break            else begin              Ch := GetChar;              if Ch = #0 then                break;              if Ch = '-' then begin                Ch := GetChar;                while (Ch = '-') do                  Ch := GetChar;                {if (Ch = #0) or (Ch = '>') then                  break;}                while not (Ch in [#0,'>']) do                  Ch := GetChar;                break;              end;            end;          until false;          CurToken := IpHtmlTagComment;        end else begin                  

PascalDragon:

--- Quote from: wp on May 12, 2022, 09:51:21 am ---Sorry for being inaccurate. Whenever the scanner finds an opening html comment tag ('<!-') it ignores everything until the closing tag is found.
--- End quote ---

Then according to the link I mentioned that would need to be changed for HTML4 and higher...

wp:
Patches are welcome.

Soner:
Thanks for the answers.
I removed now the comments from css-parts.

Maybe IpHtml needs a variable like currentsection is css-part, javascript or html and ignore comment-tag in css/javascript sections.

wp thanks for the hint at the right place in the source code. But I have no time for inspecting this now, maybe later.

Navigation

[0] Message Index

[*] Previous page

Go to full version