Manol Posted August 25, 2013 Posted August 25, 2013 I have got same plain text with html tags in a textarea ( ex: <h1>hi there</h1> ), how can I echo it like hi there, now is echoing just <h1>hi there</h1>, thank you.
SiNNuT Posted August 25, 2013 Posted August 25, 2013 You probably have the HTML Entity Encoder text formatter turned on for the field in question. You will find this setting on the details tab of the field. Disable this to allow html to render. 1
Manol Posted August 25, 2013 Author Posted August 25, 2013 Text formatters are empty. I filled the textarea with the module import from CSV file. Here is an example of the output: <div><font face=Arial size=2 color=black>Set de <strong>4 disfraces</strong> (talla para 3-7 años) + <strong>CD AUDIO MP3</strong> con la grabación completa (música y voz) de <strong>un cuento en diferentes idiomas</strong> para su representación teatral. El <strong>CD MP3</strong> incluye <strong>libro de diálogos</strong> y <strong>guía pedagógica</strong>.</font></div>
horst Posted August 26, 2013 Posted August 26, 2013 <maybe-this-helps>http://processwire.com/talk/topic/4096-how-to-translate-text-containing-html-tags/#entry40116</maybe-this-helps>
SiNNuT Posted August 26, 2013 Posted August 26, 2013 Strange. Somehow, somewhere htmlentities conversion seems to take place. If there are no textformatters applied i haven't got a clue where that could be. Is the csv data itself correct? Have you checked what's in the database table for the field in question?
Manol Posted August 26, 2013 Author Posted August 26, 2013 Thank you hosrt and SiNNut, working with echo html_entity_decode($t, ENT_QUOTES, 'UTF-8');
ryan Posted August 29, 2013 Posted August 29, 2013 Strange. Somehow, somewhere htmlentities conversion seems to take place. If there are no textformatters applied i haven't got a clue where that could be. Is the csv data itself correct? Have you checked what's in the database table for the field in question? The import data must have been entity encoded before import. It would probably be a good idea to de-entity encode it, so that it can be used in a rich text editor. You'd want to run it through something like this, once: foreach($pages->find("selector to find your imported pages") as $item) { $item->of(false); $item->body = html_entity_decode($item->body, ENT_QUOTES, 'UTF-8'); $item->save(); } 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now