Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter

Categories

In this Discussion

Who's Online 13

CurtisOdenconnectrleafmonster422 +9 guests

Vanilla : HTML formating error

Hi ! I noticed an error in Vanilla HTML formating. I tried to display this: <pre>$this->PageJump = "<a class=\"PageJump AllDiscussions\" href=\"./\">Show all discussions</a>";</pre> This works fine excepts the <a> link will be interpreted. Copy and paste in a HTML comment and you'll notice the error too. I also tried to do this with a <code> tag, but I had the same result.

Comments

  • Posts: 921
    So, what are you trying to do exactly? Put the html anchor in between <pre> or <code> tags?
  • Posts: 28
    Juts trying to output the code in <pre> and </pre> tags to be better desplayed, but the link was displayed like a "true" HTML link, instead of text !
  • Posts: 921
    So you want the actual HTML code to be displayed? Replace all '<' with '<' and '>' with '>'.
  • Posts: 28
    I don't think the problem is in my text, because everything between <pre> and </pre> shouldn't be interpreted.
  • Posts: 921
    No, there can be interpreted HTML within <pre> tags. Run the html through the PHP function htmlspecialchars(), that'll get you what you need.
  • Posts: 28
    Sorry ... the <xmp> tag should be used, but it's now deprecated.
This discussion has been closed.