I’ve problem with js toolip. I use one fine from http://ara-abcarians.com/jquery/atooltip/. The text is loading from MySQL database.
echo "<td nowrap='nowrap'> <a href=\"#\" class=\"clickTip exampleTip\" ";
echo "title1=\" ".$row['text']." \" ";
echo "> aaaaa </a></td>";
The text from dbase is with a formated image
<img style="float: left;" src="./public/repository/images/2n0lcud.gif" alt="" width="350" height="76" />
and the ending visualisation is crashing.
2011-10-28 00:05:15 3
2011-10-29 23:54:15 4
2011-10-30 11:43:01 żźćńąśłęó ŻŹĆŃĄŚŁĘÓ "> 5
2011-10-31 01:26:05 a1
2011-10-31 01:26:33 a2
2011-10-30 11:43:01 żźćńąśłęó ŻŹĆŃĄŚŁĘÓ "> 5
where
żźćńąśłęó ŻŹĆŃĄŚŁĘÓ - a piece of main text of the news - not to show (at this moment)
"> - element of the html/php code - of course not to show
5 - title of the news - only this can be show
I change the code to:
echo "title1=' ".$row['text']." ' ";
and no crashing visualisation in old point
2011-10-28 00:05:15 3
2011-10-29 23:54:15 4
2011-10-30 11:43:01 5
2011-10-31 01:26:05 a1
2011-10-31 01:26:33 a2
but a crash is now in a new point
2011-10-28 00:05:15 '>3
2011-10-29 23:54:15 4
2011-10-30 11:43:01 5
2011-10-31 01:26:05 a1
2011-10-31 01:26:33 a2
in the main text (from title 3) I’ve
xxxx'fffff 999999/666666
when I try to display the text (of the news) I see only
xxxx
(The text was loading into dbase via tiny_mce and the code)
addslashes($text)
Maybe any suggestion how to fix it?
brgs
Use
htmlspecialcharswith theENT_QUOTESoption, addslashes should be used to escape input not output!