![]() |
|
|
|||||||
![]() |
|
|
Thread Tools | Rate Thread |
|
|
PM User | #1 |
|
New to the CF scene Join Date: Feb 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
![]() |
HTML with MySQL > and <
Hi,
My trouble is this. I have a Perl script accessing a MySQL database that contains a veriety of things as well as HTML content. My Perl creates an interface for editing the HTML content, everything is find up until I add < or > which is part of the content and not part of the html, what it does during edit is display the > as < rather than just leave it alone as I would like...Also, the content is written in HTML, so it must leave alone < and > as they are, as well as > and < without conversion. Then when the edit is complete and the content displayed it thinks that whats held between the <> is html code and doesn't display it.... I realise that it is the browser thats doing this, but surely there is a way to either stop it or protect the symbols... Can anyone help with this..... Jonathan P.S. Incidentally, I notice that this system doesn't have this problem, though I do not wish to move to PHP at this point.... Last edited by jonathan7799; 02-04-2005 at 04:15 PM.. |
|
|
|
|
|
PM User | #2 |
|
Regular Coder ![]() Join Date: Nov 2004
Location: Somewhere over the rainbow
Posts: 208
Thanks: 0
Thanked 0 Times in 0 Posts
![]() |
if you had &gt; that will fix it...
i guess that & is replaced by & when it is entered into the database here at coding forums...
__________________
Questions are what binds the universe, Questions lead to answers, Answers lead to knowledge, Knowledge leads to wisdom, Wisdom brings more questions -- Horus Kol, 2004 :) |
|
|
|
|
|
PM User | #3 |
|
New to the CF scene Join Date: Feb 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
![]() |
&gt;
I tried &gt; ...
It goes through the edit once, but on second edit it is converted goes like this... &gt; then > then > am I missing something in the Perl... Jonathan |
|
|
|
|
|
PM User | #4 |
|
Regular Coder ![]() Join Date: Nov 2004
Location: Somewhere over the rainbow
Posts: 208
Thanks: 0
Thanked 0 Times in 0 Posts
![]() |
ah...
right... when you submit the form, and before it gets entered into the database, you need to replace any & symbols with & that way, when it is displayed again it will only look like &, but will again be entered into the database as &
__________________
Questions are what binds the universe, Questions lead to answers, Answers lead to knowledge, Knowledge leads to wisdom, Wisdom brings more questions -- Horus Kol, 2004 :) |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Rate This Thread | |
|
|