How to output < in JSPX without it being interpreted by the browser

Go To StackoverFlow.com

1

I am writing an html hint sheet in .JSPX and I want user to see

<b>

So, I write

&#60;b&#62;

OR

&lt;b&gt;

but both of these produce

<b> 

as their output to the browser and everything afterwards goes bold.

What am I missing?

Thanks.

2012-04-04 00:18
by Alex Paransky


0

The JSPX parser is processing your entity.
You need to escape the & to prevent that: &amp;lt;

2012-04-04 00:20
by SLaks
Is this a standard way of doing this type of thing in JSPX, or is there something not properly configured on my side - Alex Paransky 2012-04-05 18:04
@AlexParansky: I don't really know JSPX, but this is the only way to do it if you want to use valid XML - SLaks 2012-04-05 19:33
@AlexParansky As far as I know, this is the standard way to do it - DCKing 2014-04-30 10:48
Ads