ソースを参照

test: add test case for #7223

Evan You 8 年 前
コミット
86e4d7566e
1 ファイル変更14 行追加0 行削除
  1. 14 0
      test/ssr/ssr-string.spec.js

+ 14 - 0
test/ssr/ssr-string.spec.js

@@ -1112,6 +1112,20 @@ describe('SSR: renderToString', () => {
       done()
       done()
     })
     })
   })
   })
+
+  // #7223
+  it('should not double escape attribute values', done => {
+    renderVmWithOptions({
+      template: `
+      <div>
+        <div id="a\nb"></div>
+      </div>
+      `
+    }, result => {
+      expect(result).toContain(`<div id="a\nb"></div>`)
+      done()
+    })
+  })
 })
 })
 
 
 function renderVmWithOptions (options, cb) {
 function renderVmWithOptions (options, cb) {