Accordion fix

`item.path` and `item.basename` had to be escaped.

To escape those, I've refactored the code to use `.text()` and `escape()` method. Those methods escapes the string.