This forum is temporaily read-only. All existing discussions remain available for reference. For new questions, bug reports or support requests, please contact us at mail@lmdsupport.com.

TElHTMLView: the '&' symbol

edited June 2013 in LMD ElPack

Hello!

ElHTMLView.Caption := '&z=12  Test';  //it shows only 'Test'

if remove the first '&' symbol or place a space after it, it works ok, but I need to show ampersand symbols in URLs... How can I make it work properly?

-Dmitry

Comments

  • Use the correct HTML-Encoding for that special character:

    <code>&amp;amp; or &amp;#38;
  • So it is necessary to pre-process text before loading into elhtmlview.. All browsers show this character correctly ('&z' like '&z', '&amp;' like '&'), I think this is a bug in your html renderer. Or bug/feature. )

  • Yes, that is neede,
    All browser show this correcter because the are very error-tollerant in this area.

    try to use following html-Code

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
      <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
      <title>hello html</title>
    </head>
    <body>
    Test Text1: &b<br>
    Test Text2: &amp;b
    </body>
    </html>

    and do a validation via http://validator.w3.org
  • @Bernhard
    Thank you for answering the question

    It is not the goal of ElPack HTML controls to emulate a browser. Only subset of HTML is supported (http://wiki.lmd.de/index.php/LMD_VCL_-_MiniHTML).
Sign In or Register to comment.