Forum Moderators: open

Message Too Old, No Replies

Validator problem with "a" in <textarea>

         

keyplyr

11:11 am on Jul 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Getting a validation error because of text starting with the letter "a" in textarea:

<form action=""><textarea cols="99" rows="1" name="blah" id="blah"><a href="http://www.example.com/">A Title of Company</a> more text.</textarea></form>

Val says doc type does not allow A there (Using 4.01 transitional loose.)

The A is part of a trademarked company name, and cannot be left out. Is there a work-around to get the page to validate? Thanks

Span

11:47 am on Jul 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think it is not about the "A" but about the <a> tag.

moltar

2:55 pm on Jul 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, you need to escape all HTML. Should be:

<form action=""><textarea cols="99" rows="1" name="blah" id="blah">
&lt;a href=&quot;http://www.example.com/&quot;&gt;A Title of Company&lt;/a&gt; more text.
</textarea></form>

keyplyr

6:56 pm on Jul 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Thanks moltar, that's it.