« Miscellanea | Main | Not Much Happened Today »

January 19, 2004

Long Weekend

During the three day weekend, I have been working on fixing everything in the syntax menu of Taco HTML Edit. I'm basically consolidating some repetitive code. After this, it should be easier to fix bugs and add features. I'm running into some difficulties on how the HTML syntax checker should work. For example, consider the following code:

<a href="http://tacosw.com>Taco Software<a>
You will notice that the quote for the address is not closed. Should the syntax checker automatically close the quote when it reaches the ">", or should it consider everything to be part of the quote. In this case, the desired interpretation would be to close the anchor tag at the first ">". Otherwise, the syntax checking would be messed up for the rest of the document. However, now consider the following code:
<input type="submit" name="submit" value="-->">
This quote displays a button, with a "-->" arrow for the title. If the syntax checker is implemented as previously described, the tag will be considered terminated at the ">" that is part of the arrow. This interpretation is not correct. However, this problem could be avoided by using the following code, which would probably be considered better:
<input type="submit" name="submit" value="--&gt;">
After reviewing things, I think that I'm going to go with a strict interpretation of quotes. I just messed around with Safari's rendering, and Safari used a strict interpretation. This will force the user to have appropriate usage of quotes before being able to check syntax correctly, which might actually be a good thing.

Update: I just checked Dave Hyatt's Blog (Dave Hyatt is a Safari developer), and ironically enough, he mentions the exact problem that I talk about in this entry.

Posted by doshirj at January 19, 2004 02:38 AM

Comments