Section names create unescaped characters

One of my users is working on an exhibit, and she created a section that was also the title of an article. As such, she put the section title in quotation marks.

Omeka brought those quotation marks into the markup, creating an HTML link to the section that contained unescaped quotation marks. Of course, this rendered the link unusable, and no one was able to get access to that section. I'm thinking this is a bug that needs addressing.

In the meantime, I could suggest that she use character entities for the quotation marks, but it looks like Omeka does, in fact, digest certain punctuation characters and rewrite them. Is there a list anywhere of allowable characters?

Any advice?

--Kerri

You're right, that is a bug, and thanks for catching it. I've filed a bug report and it will be fixed in the next release. For the moment though, I would try using curly quotes, since those won't trip up the browser when it parses the HTML. Otherwise, you can avoid using quotes for titles of sections in the immediate future.

As to allowable characters, I get that you're talking about how Omeka converts some characters to the HTML entities but leaves others intact. When writing templates for Omeka, it's generally a good idea to enter the text rather than the HTML entities representation (e.g. use curly quotes rather than typing —, & instead of & etc.). There is a templating helper function called h() that is used throughout omeka which will take care of making sure the HTML output is valid. In most cases this is a synonym for php's built-in htmlentities() function, but it also allows you to mix HTML tags in your data entry, so in most cases you could enter the following into Omeka:

Cookies & Cream

And it would spit out:

Cookies & Cream

Hope that helps.

Actually, disregard that last example, I haven't gotten the hang of using code examples on this forum yet.