Handling quotes is difficult

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 <abbr title="eXtensible Markup Language">. But what happens when the string between the quotes also contains quotes? ...Errors!

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 &quot;.

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

technorati1.PNG

The following happened:

technorati2.PNG

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.

Leave a comment

Monthly Archives

Recent Entries

  • Comments and tweets

    A recent trend in the blogosphere has been to add **tweets as comments** on posts. I understand where this comes from, as in general...

  • Manifiesto «En defensa de los derechos fundamentales en internet»

    Ante la inclusión en el Anteproyecto de Ley de Economía sostenible de modificaciones legislativas que afectan al libre ejercicio de las libertades de expresión, información...

  • Commenting not possible

    I just discovered that it currently is not possible to comment on this blog. At first sight it looks like the problem is caused...

  • Back from the CeBIT

    I am back from the CeBIT show. Actually, I came back on Monday, but have been too busy to post. This year has been...

  • Downloading viruses?

    I just saw the screen above, which is the ClamWin antivirus software uploading its virus database. On the left hand side they have an animation...

Close