Reputation: 1792
I have to display this exact string in HTML:
;amp&
When I try it always changes to "&".
How to fix that?
Upvotes: 4
Views: 14110
Reputation: 1846
There is also the html entity for ampersand - &
, so if you want to print &
, just use &
Upvotes: 1
Reputation: 9732
If you want to display this exact string
;amp&
Then you you should do this...
;amp&
Upvotes: 0
Reputation: 7973
I guess you meant
&
Because that DOES change into "&". Anyway - you will have to escape the ampersand.
So - replace "&" with "&" like:
&
Upvotes: 1
Reputation: 8614
I guess you mean &
Why don't you do the following: &
?
Upvotes: 3
Reputation: 169123
Assuming you actually meant &
, you just need to escape the &
: use the HTML code &
.
Upvotes: 4
Reputation: 361749
If you mean &
, then you need to double escape it:
&
Upvotes: 13