Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

DOCTYPE html breaks postscribe #358

Open
ayxos opened this issue Dec 8, 2016 · 0 comments
Open

DOCTYPE html breaks postscribe #358

ayxos opened this issue Dec 8, 2016 · 0 comments

Comments

@ayxos
Copy link

ayxos commented Dec 8, 2016

If i have to Embed an Html chunk with DOCTYPE, postscribe is not able to render it properly

var html = "<!DOCTYPE html><html><head><title>Title of the document</title></head><body>The content of the document......</body></html>";
    
postscribe('#test1', html);

Easily solved:

html = html.replace(/\<(\?xml|(\!DOCTYPE[^\>\[]+(\[[^\]]+)?))+[^>]+\>/g, '');

https://jsfiddle.net/ayxos/k7p14c3e/3/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants