-
February 9th, 2007, 08:34 AM
#1
Senior Member
HTML Reminder someone
OK guys I'm stuck again, as usual
I need to put in some text that looks like html tags. I remember there was a tag that means that html stops interpretin anything within it. But don't remember it of the top of my head, and as usual in such cases can't find it anywhere
Does anyone remember it?
Don\'t post if you\'ve got nothing constructive to say. Flooding is annoying
-
February 9th, 2007, 09:15 AM
#2
Remark tag
<!-- the remark goes here -->
ddddc
"Somehow saying I told you so just doesn't cover it" Will Smith in I, Robot
-
February 9th, 2007, 09:28 AM
#3
Senior Member
Originally Posted by fourdc
Remark tag
<!-- the remark goes here -->
This one stops HTML from showing anything that's within it, But I need it to show the text within it, but not interprete it
Don\'t post if you\'ve got nothing constructive to say. Flooding is annoying
-
February 9th, 2007, 09:38 AM
#4
Senior Member
Now the problem seems to be a bit deeper then I originaly thought. I guess I'll have to describe the full situation.
I have a function in PHP that displays text out of DB, it then puts this text in to a hiden variable that posts it to another page.
The code is
echo '<td>' . $error_reason . '<br> <br> <input type="submit" value="Update"> </td>';
for displaying the variable with the text
echo '<input type="hidden" name="error_reason" value="' . $error_reason . '"/>';
for the hiden value
Now whenever going through this code, the browser has problems with the text that got double quote marks in it.
Don\'t post if you\'ve got nothing constructive to say. Flooding is annoying
-
February 9th, 2007, 11:26 AM
#5
Are these the functions you were looking for?
htmlspecialchars or htmlentities
Last edited by SirDice; February 9th, 2007 at 11:30 AM.
Oliver's Law:
Experience is something you don't get until just after you need it.
-
February 9th, 2007, 12:02 PM
#6
Senior Member
I solved the problem a bit differently, but this one is definately a good one for the future
Don\'t post if you\'ve got nothing constructive to say. Flooding is annoying
-
February 9th, 2007, 02:20 PM
#7
-
February 9th, 2007, 09:40 PM
#8
A quick and dirty method of stopping html from being parsed is to enclose it in the following tags:
<XMP>
</XMP>
I don't think its valid, but it works.
-xmaddness
-
February 9th, 2007, 10:49 PM
#9
Think <pre> </pre> still works too...though its not supported anymore...
There is only one constant, one universal, it is the only real truth: causality. Action. Reaction. Cause and effect...There is no escape from it, we are forever slaves to it. Our only hope, our only peace is to understand it, to understand the 'why'. 'Why' is what separates us from them, you from me. 'Why' is the only real social power, without it you are powerless.
(Merovingian - Matrix Reloaded)
-
February 10th, 2007, 02:48 PM
#10
Nope, it doesn't. You can have tags inside <pre></pre> and they will be interpreted.
Cheers,
cgkanchi
Similar Threads
-
By al1aprize in forum Other Tutorials Forum
Replies: 0
Last Post: March 15th, 2004, 01:32 AM
-
By HippoDuck in forum Web Security
Replies: 7
Last Post: April 8th, 2003, 11:37 AM
-
By doxical in forum Newbie Security Questions
Replies: 5
Last Post: February 27th, 2003, 12:02 AM
-
By jethro in forum Other Tutorials Forum
Replies: 8
Last Post: June 25th, 2002, 06:19 PM
-
By hot_ice in forum Other Tutorials Forum
Replies: 10
Last Post: March 11th, 2002, 06:18 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|