diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2019-03-18 11:50:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-18 11:50:55 +0100 |
commit | 014aa10fc0c2e1431235134c5f94c467e8c17cbd (patch) | |
tree | e0d2d4542b661abe50f0b2520b0fe6e10ae5bd26 /actionview/app | |
parent | aa225455a01e57016e0a28f5d88f6a751ef7b5d2 (diff) | |
parent | 34fc4dee39413529d3e43676b60b196923873639 (diff) | |
download | rails-014aa10fc0c2e1431235134c5f94c467e8c17cbd.tar.gz rails-014aa10fc0c2e1431235134c5f94c467e8c17cbd.tar.bz2 rails-014aa10fc0c2e1431235134c5f94c467e8c17cbd.zip |
Merge pull request #35652 from razh/revert-rails-ujs-html-content
Revert "Pass HTML responses as plain-text in rails-ujs"
Diffstat (limited to 'actionview/app')
-rw-r--r-- | actionview/app/assets/javascripts/rails-ujs/utils/ajax.coffee | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionview/app/assets/javascripts/rails-ujs/utils/ajax.coffee b/actionview/app/assets/javascripts/rails-ujs/utils/ajax.coffee index 019bda635a..5b223d50f6 100644 --- a/actionview/app/assets/javascripts/rails-ujs/utils/ajax.coffee +++ b/actionview/app/assets/javascripts/rails-ujs/utils/ajax.coffee @@ -69,7 +69,7 @@ processResponse = (response, type) -> script.setAttribute('nonce', cspNonce()) script.text = response document.head.appendChild(script).parentNode.removeChild(script) - else if type.match(/\bxml\b/) + else if type.match(/\b(xml|html|svg)\b/) parser = new DOMParser() type = type.replace(/;.+/, '') # remove something like ';charset=utf-8' try response = parser.parseFromString(response, type) |