Forum > Lazarus Extra Components
TIpHtmlPanel bug introduced after version 1.8.5
Soner:
I noticed a new bug in TIpHtmlPanel. When you have comment-tags in css-part of html-file this css-part is ignored:
<style type="text/css">
<!--
This part is ignored due the tag-comment.
body{ font-size:9pt; font-family:Arial, Helvetica, sans-serif }
table{ font-size:9pt; font-family:Arial, Helvetica, sans-serif }
-->
</style>
It is worked in lazarus 1.8.5.
paweld:
This is not a bug but correct parser behavior.
PascalDragon:
--- Quote from: paweld on May 11, 2022, 12:38:58 pm ---This is not a bug but correct parser behavior.
--- End quote ---
Not quite. There are special rules for this situation.
wp:
Comparing the source code between Laz 1.8.4 and Laz/main, I see only irrelevant changes in TIpHtml.ParseStyle (removal of Delphi-related defines), and absolutely no change in TIpHtml.NextToken which (among a lot of other things) is responsible for removal of html comments.
Therefore, html-comment tags in css have been ignored by the IpHtmlPanel all the time (at least since v1.8.4).
What you see as difference between your v1.8.5 and the current version is (probably) due to different handling of the DefaultFontSize and DefaultTypeFace properties of the IpHtmlPanel which are used when no specifications for font size and type face are found in the html text (which is true here since the style is commented out).
PascalDragon:
--- Quote from: wp on May 12, 2022, 12:27:12 am ---Therefore, html-comment tags in css have been ignored by the IpHtmlPanel all the time (at least since v1.8.4).
--- End quote ---
Are the tags themselves ignored or is their content ignored as well? (just to clarify)
Navigation
[0] Message Index
[#] Next page