One of the biggest problems in scripting and programming is escaping quotes. Quotes have a special meaning, they are usually used for specifying the start and end of a string, such as in
. But what happens when the string between the quotes also contains quotes? …Errors!<abbr title="eXtensible Markup Language">
There are several ways to prevent this situation. The two most common solutions are escaping the quotes by placing a special symbol in front of it such as "
and replacing the quote by its character entity reference "e;
.
Why am I telling this? Well, this morning I was looking at Technorati’s Favorites function, and noticed that something went wrong. When adding a site to your favorites, you have the posibility to attach tags to that site. The instructions for adding tags are clear:
Separate tags with spaces: cooking indian recipes. To join words use double quotes: "san francisco".
But it doesn’t work that way! When I tried to add “point of sale” as a tag
The following happened:
Technorati obviously tried to solve the quoting problem by replacing the quotes, but this change has a nasty side effect. Of course I have contacted Technorati about this issue, and will update this post when they reply.