Skip to content

Commit

Permalink
fix autoescape for array values; fixes mozilla#835
Browse files Browse the repository at this point in the history
  • Loading branch information
devoidfury committed Sep 7, 2016
1 parent 8fbc83d commit 60b1034
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ function markSafe(val) {
function suppressValue(val, autoescape) {
val = (val !== undefined && val !== null) ? val : '';

if(autoescape && typeof val === 'string') {
val = lib.escape(val);
if(autoescape && typeof val === 'string' || lib.isArray(val)) {
val = lib.escape(''+val);
}

return val;
Expand Down

0 comments on commit 60b1034

Please sign in to comment.