balupton/jquery-ajaxy — pull request #7 by exocom (2012-12-25 16:50:10+00:00)
Title: Bug Fixed: <header> being stripped. Simple update to RegEX

Hello,

Thanks for the awesome script! Please commit this bug fix. I have simply updated the existing RegEX to include \b word boundary.

I noticed that when a requested page contained a html5 header element it was being stripped out. The is because of the RegEX used in the replace function found in htmlCompat.

"

test regex

\n

content

".replace(/<(html|head|body|title|meta)\b/gi,'

test regex

\n

content

"

Will match '

' but not '

'.

Thanks,
Kalarrs Topham

Given this requested page:

A article header

A section of the article

Before Bug Fix: (header tag was stripped out)

A article header

A section of the article

After Bug Fix:

A article header

A section of the article