Evan You 8 лет назад
Родитель
Сommit
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()
     })
   })
+
+  // #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) {