17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1327 Views |
-
Special html characters being re-encoded in html! £ being changed to £

22 November 2008 at 11:51pm Last edited: 22 November 2008 11:52pm
I have a list of currency symbols listed in my database that are entered into a text field.
For the Pound Symbol £ - I am entering £, however when I then try and use this in a template, the ampersand - &, is being encoded again as &. So this displays the symbol incorrectly as £ on the page (or £ in the html source code) rather than £.
Is there a way to stop this from re-encoding in the template?
-
Re: Special html characters being re-encoded in html! £ being changed to £

23 November 2008 at 9:21am
Found the solution on the following page:
http://api.silverstripe.com/sapphire/model/Text.htmlWhen inserting content into a template and to avoid special characters from being re encoded - use .NoHTML
Ie $ContentType.NoHTML - simple
| 1327 Views | ||
|
Page:
1
|
Go to Top |

