Reply to Re: Apostrophe issue

Your name:

Reply:


Posted by Shawn Wilson on 09/19/05 03:28

"Tyrone Slothrop" <ts@paranoids.com> wrote in message
news:ssrmi1prktr03p7n1hekb2knfje1cleanu@4ax.com...
> On Fri, 16 Sep 2005 22:06:53 GMT, "Shawn Wilson"
> <shawnw_nospam_@_nospam_dvigroup.net> wrote:
>
>>My problem is with the use of an apostrophe (single quote) and other such
>>characters as they break my HTML. I'm also using javascript and it's a
>>problem there as well.
>>
>>The method I use to insert such characters works without problems. In the
>>SQL I get what was intended... e.g. Ginny's Wedding
>>
>><a href="album.php?albumid=293&amp;frompage=1"><img id="img_two"
>>src="data/293/0/cover3.jpg" alt="Ginny's Wedding"
>>onMouseOver="switchit('Ginny's Wedding - Jun 11 2005');"
>>onMouseOut="clearit();"></a><br>
>>
>>...But then my JS broken because the text is in single quotes and another
>>extra one breaks it.
>
> Shawn:
>
> Refer to these:
> http://us2.php.net/manual/en/function.htmlspecialchars.php
> http://us2.php.net/manual/en/function.htmlentities.php
>
> Since what you seem to be pulling from the data table is simple text
> to populate the display, they ought to work for you.

Well, that converts my single quote to [&#039;], but that also breaks the
javascript.

Maybe I need to move on to a JS group for this one.

--
Shawn Wilson

[Back to original 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

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