#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Location
    Hong Kong
    Posts
    73
    Rep Power
    15
    is there any <MagicTag> which can suspend the
    browser reading the HTML <Tag>:

    eg:

    <MagicTag>
    Hello<BR>
    World<BR>
    </MagicTag>

    will output:
    "HelloWorld" instead of
    "Hello
    World
    "

    I need to do this because I have a <textarea>
    input field in a homepage. I dont want
    anyway use <TAG> on that input field.
  2. #2
  3. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    Perth West Australia
    Posts
    757
    Rep Power
    15
    Not quite sure what you want but

    <hello<br>world;

    will output 'hello<br>world'

    what exactly is it you want to achieve?
    firepages@hotmail.com


    ------------------
    Simon Wheeler
    FirePages -DHTML/PHP/MySQL
  4. #3
  5. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    Perth West Australia
    Posts
    757
    Rep Power
    15
    sorry - forum disabled the <!--'&lt'-->
    <!--<hello<br>world;-->

    will output 'hello<br>world'

    what exactly is it you want to achieve?
    firepages@hotmail.com


    ------------------
    Simon Wheeler
    FirePages -DHTML/PHP/MySQL
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Location
    Hong Kong
    Posts
    73
    Rep Power
    15
    Thanks for your reply firepages,

    indeed, I have made a message discussion board by PHP/MySQL.

    I just found out that
    if someone put a HTML <TAG> eg, <TEXTAREA>
    in a message,
    my discussion board program might display
    something "wrong"

    i want the browser ignore reading the <TAG>
    I am not sure if <!---
    will work
    let me try it out
    thx for your reply.
  8. #5
  9. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    Perth West Australia
    Posts
    757
    Rep Power
    15
    hi again
    sorry about the last couple of messages - the forum would not print out the '&literal command - which is exactly the sort of thing that you want to avoid , malicious html tags in textareas etc can be a problem .
    I note that you have PHP - so why not use the php ereg commands you can check and format any inputted data before you save it anywhere. See the Regular expression functions in the php manual (http://www.php.net).

    Regards Simon

    ------------------
    Simon Wheeler
    FirePages -DHTML/PHP/MySQL

Similar Threads

  1. opening multiple browser windows
    By 7stud in forum Dev Shed Lounge
    Replies: 12
    Last Post: April 1st, 2009, 01:50 PM
  2. Replies: 6
    Last Post: February 6th, 2004, 06:22 AM
  3. Problems reading txt file. (with fgets)
    By barcodegeek in forum PHP Development
    Replies: 1
    Last Post: December 18th, 2003, 03:14 PM
  4. Delete cookie on browser exit
    By Chewie in forum PHP Development
    Replies: 10
    Last Post: March 22nd, 2003, 10:58 AM
  5. Sessions, and cross browser compatability
    By rendy in forum PHP Development
    Replies: 4
    Last Post: February 11th, 2003, 07:19 AM

IMN logo majestic logo threadwatch logo seochat tools logo