Skip to content
This repository has been archived by the owner on Sep 5, 2018. It is now read-only.

handle <noscript> as a RAWTEXT element #139

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/context-parser-handlebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,9 @@ ContextParserHandlebars.prototype.addFilters = function(parser, input) {
case stateMachine.State.STATE_RAWTEXT: // 5
// inside raw text state, HTML parser ignores any state change that looks like tag/attribute
// hence we apply the context-insensitive NOT_HANDLE filter that escapes '"`&<> without a warning/error
if (tagName === 'xmp' || tagName === 'noembed' || tagName === 'noframes') {
// Regarding noscript tag, see #4 in http://www.w3.org/TR/html/syntax.html#concept-frag-parse-context
if (tagName === 'noscript' || tagName === 'xmp' ||
tagName === 'noembed' || tagName === 'noframes') {
return [filterMap.NOT_HANDLE];
}

Expand Down