djax icon indicating copy to clipboard operation
djax copied to clipboard

Djax thrown off by exceptions with hyphens

Open paxperscientiam opened this issue 8 years ago • 0 comments

Hi there beezee, from what I can tell, djax does not recognize internal link exceptions with hyphens in the page name.

$('body').djax('.updateable', ['xml-sitemap','united-nations'], transition);

Djax apparently will ignore the 'xml-sitemap' and 'united-nations'; however, partial names, such as 'xml' and 'united' do work. The problem with this is the potential for name clashes. The apparent solution is to escape the hyphen with a backwards slash.

$('body').djax('.updateable', ['xml\-sitemap','united\-nations'], transition);

This works for me, though it is not made clear that this needs to be done. I'm guessing this is common knowledge for people working with js/jquery; however, it might be helpful to bake in special character escaping into djax.

paxperscientiam avatar Aug 20 '15 15:08 paxperscientiam