You are here: Re: How to convert HTML special characters to the real characters with a Java script « HTML « IT news, forums, messages
Re: How to convert HTML special characters to the real characters with a Java script

Posted by Toby Inkster on 03/22/06 01:58

Stefan Mueller wrote:

> echo "var_old_data = '" . $html_data . "';";

At a guess... you're pasting $html_data into a section of Javascript --
i.e. you're pasting HTML data into something that isn't HTML. So this data
shouldn't be escaped with htmlentities().

(More technically, the stuff between <script> and </script> is CDATA, so
you don't need to do any HTML-style escaping -- you just need to avoid
using '</'.)

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация