From 1f6e72b11051561abe270fa233cf52d5aba01d6b Mon Sep 17 00:00:00 2001 From: Evan You Date: Wed, 8 Apr 2020 18:51:25 -0400 Subject: [PATCH] fix(compiler): support full range of entity decoding in browser builds BREAKING CHANGE: compiler options have been adjusted. - new option `decodeEntities` is added. - `namedCharacterReferences` option has been removed. - `maxCRNameLength` option has been rmeoved. --- .../__snapshots__/parse.spec.ts.snap | 3684 ++++++----------- .../compiler-core/__tests__/parse.spec.ts | 272 +- packages/compiler-core/src/errors.ts | 21 - packages/compiler-core/src/options.ts | 8 +- packages/compiler-core/src/parse.ts | 178 +- packages/compiler-dom/__tests__/parse.spec.ts | 79 +- packages/compiler-dom/src/decodeHtml.ts | 133 + .../compiler-dom/src/decodeHtmlBrowser.ts | 6 + packages/compiler-dom/src/index.ts | 7 +- ...rserOptionsMinimal.ts => parserOptions.ts} | 5 +- .../compiler-dom/src/parserOptionsStandard.ts | 17 - 11 files changed, 1423 insertions(+), 2987 deletions(-) create mode 100644 packages/compiler-dom/src/decodeHtml.ts create mode 100644 packages/compiler-dom/src/decodeHtmlBrowser.ts rename packages/compiler-dom/src/{parserOptionsMinimal.ts => parserOptions.ts} (92%) delete mode 100644 packages/compiler-dom/src/parserOptionsStandard.ts diff --git a/packages/compiler-core/__tests__/__snapshots__/parse.spec.ts.snap b/packages/compiler-core/__tests__/__snapshots__/parse.spec.ts.snap index c7af84fff73..998b00ab7b9 100644 --- a/packages/compiler-core/__tests__/__snapshots__/parse.spec.ts.snap +++ b/packages/compiler-core/__tests__/__snapshots__/parse.spec.ts.snap @@ -210,1181 +210,28 @@ Object { } `; -exports[`compiler: parse Errors ABSENCE_OF_DIGITS_IN_NUMERIC_CHARACTER_REFERENCE 1`] = ` -Object { - "cached": 0, - "children": Array [ - Object { - "children": Array [], - "codegenNode": undefined, - "isSelfClosing": false, - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - "offset": 34, - }, - "source": "", - "start": Object { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "ns": 0, - "props": Array [ - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - "offset": 22, - }, - "source": "attr=\\"c\\"", - "start": Object { - "column": 11, - "line": 1, - "offset": 10, - }, - }, - "name": "attr", - "type": 6, - "value": Object { - "content": "c", - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - "offset": 22, - }, - "source": "\\"c\\"", - "start": Object { - "column": 16, - "line": 1, - "offset": 15, - }, - }, - "type": 2, - }, - }, - ], - "tag": "template", - "tagType": 0, - "type": 1, - }, - ], - "codegenNode": undefined, - "components": Array [], - "directives": Array [], - "helpers": Array [], - "hoists": Array [], - "imports": Array [], - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - "offset": 34, - }, - "source": "", - "start": Object { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "temps": 0, - "type": 0, -} -`; - -exports[`compiler: parse Errors ABSENCE_OF_DIGITS_IN_NUMERIC_CHARACTER_REFERENCE 1`] = ` -Object { - "cached": 0, - "children": Array [ - Object { - "children": Array [], - "codegenNode": undefined, - "isSelfClosing": false, - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - "offset": 33, - }, - "source": "", - "start": Object { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "ns": 0, - "props": Array [ - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - "offset": 21, - }, - "source": "attr=\\"&#a;\\"", - "start": Object { - "column": 11, - "line": 1, - "offset": 10, - }, - }, - "name": "attr", - "type": 6, - "value": Object { - "content": "&#a;", - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - "offset": 21, - }, - "source": "\\"&#a;\\"", - "start": Object { - "column": 16, - "line": 1, - "offset": 15, - }, - }, - "type": 2, - }, - }, - ], - "tag": "template", - "tagType": 0, - "type": 1, - }, - ], - "codegenNode": undefined, - "components": Array [], - "directives": Array [], - "helpers": Array [], - "hoists": Array [], - "imports": Array [], - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - "offset": 33, - }, - "source": "", - "start": Object { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "temps": 0, - "type": 0, -} -`; - -exports[`compiler: parse Errors ABSENCE_OF_DIGITS_IN_NUMERIC_CHARACTER_REFERENCE 1`] = ` -Object { - "cached": 0, - "children": Array [ - Object { - "children": Array [], - "codegenNode": undefined, - "isSelfClosing": false, - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - "offset": 35, - }, - "source": "", - "start": Object { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "ns": 0, - "props": Array [ - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - "offset": 23, - }, - "source": "attr=\\"ÿ\\"", - "start": Object { - "column": 11, - "line": 1, - "offset": 10, - }, - }, - "name": "attr", - "type": 6, - "value": Object { - "content": "ÿ", - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - "offset": 23, - }, - "source": "\\"ÿ\\"", - "start": Object { - "column": 16, - "line": 1, - "offset": 15, - }, - }, - "type": 2, - }, - }, - ], - "tag": "template", - "tagType": 0, - "type": 1, - }, - ], - "codegenNode": undefined, - "components": Array [], - "directives": Array [], - "helpers": Array [], - "hoists": Array [], - "imports": Array [], - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - "offset": 35, - }, - "source": "", - "start": Object { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "temps": 0, - "type": 0, -} -`; - -exports[`compiler: parse Errors ABSENCE_OF_DIGITS_IN_NUMERIC_CHARACTER_REFERENCE 1`] = ` -Object { - "cached": 0, - "children": Array [ - Object { - "children": Array [], - "codegenNode": undefined, - "isSelfClosing": false, - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - "offset": 34, - }, - "source": "", - "start": Object { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "ns": 0, - "props": Array [ - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - "offset": 22, - }, - "source": "attr=\\"&#xg;\\"", - "start": Object { - "column": 11, - "line": 1, - "offset": 10, - }, - }, - "name": "attr", - "type": 6, - "value": Object { - "content": "&#xg;", - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - "offset": 22, - }, - "source": "\\"&#xg;\\"", - "start": Object { - "column": 16, - "line": 1, - "offset": 15, - }, - }, - "type": 2, - }, - }, - ], - "tag": "template", - "tagType": 0, - "type": 1, - }, - ], - "codegenNode": undefined, - "components": Array [], - "directives": Array [], - "helpers": Array [], - "hoists": Array [], - "imports": Array [], - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - "offset": 34, - }, - "source": "", - "start": Object { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "temps": 0, - "type": 0, -} -`; - -exports[`compiler: parse Errors ABSENCE_OF_DIGITS_IN_NUMERIC_CHARACTER_REFERENCE 1`] = ` -Object { - "cached": 0, - "children": Array [ - Object { - "children": Array [ - Object { - "content": "c", - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - "offset": 15, - }, - "source": "c", - "start": Object { - "column": 11, - "line": 1, - "offset": 10, - }, - }, - "type": 2, - }, - ], - "codegenNode": undefined, - "isSelfClosing": false, - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - "offset": 26, - }, - "source": "", - "start": Object { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "ns": 0, - "props": Array [], - "tag": "template", - "tagType": 0, - "type": 1, - }, - ], - "codegenNode": undefined, - "components": Array [], - "directives": Array [], - "helpers": Array [], - "hoists": Array [], - "imports": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - "offset": 26, - }, - "source": "", - "start": Object { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "temps": 0, - "type": 0, -} -`; - -exports[`compiler: parse Errors ABSENCE_OF_DIGITS_IN_NUMERIC_CHARACTER_REFERENCE 1`] = ` -Object { - "cached": 0, - "children": Array [ - Object { - "children": Array [ - Object { - "content": "&#a;", - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - "offset": 14, - }, - "source": "&#a;", - "start": Object { - "column": 11, - "line": 1, - "offset": 10, - }, - }, - "type": 2, - }, - ], - "codegenNode": undefined, - "isSelfClosing": false, - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - "offset": 25, - }, - "source": "", - "start": Object { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "ns": 0, - "props": Array [], - "tag": "template", - "tagType": 0, - "type": 1, - }, - ], - "codegenNode": undefined, - "components": Array [], - "directives": Array [], - "helpers": Array [], - "hoists": Array [], - "imports": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - "offset": 25, - }, - "source": "", - "start": Object { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "temps": 0, - "type": 0, -} -`; - -exports[`compiler: parse Errors ABSENCE_OF_DIGITS_IN_NUMERIC_CHARACTER_REFERENCE 1`] = ` -Object { - "cached": 0, - "children": Array [ - Object { - "children": Array [ - Object { - "content": "ÿ", - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - "offset": 16, - }, - "source": "ÿ", - "start": Object { - "column": 11, - "line": 1, - "offset": 10, - }, - }, - "type": 2, - }, - ], - "codegenNode": undefined, - "isSelfClosing": false, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - "offset": 27, - }, - "source": "", - "start": Object { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "ns": 0, - "props": Array [], - "tag": "template", - "tagType": 0, - "type": 1, - }, - ], - "codegenNode": undefined, - "components": Array [], - "directives": Array [], - "helpers": Array [], - "hoists": Array [], - "imports": Array [], - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - "offset": 27, - }, - "source": "", - "start": Object { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "temps": 0, - "type": 0, -} -`; - -exports[`compiler: parse Errors ABSENCE_OF_DIGITS_IN_NUMERIC_CHARACTER_REFERENCE 1`] = ` -Object { - "cached": 0, - "children": Array [ - Object { - "children": Array [ - Object { - "content": "&#xg;", - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - "offset": 15, - }, - "source": "&#xg;", - "start": Object { - "column": 11, - "line": 1, - "offset": 10, - }, - }, - "type": 2, - }, - ], - "codegenNode": undefined, - "isSelfClosing": false, - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - "offset": 26, - }, - "source": "", - "start": Object { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "ns": 0, - "props": Array [], - "tag": "template", - "tagType": 0, - "type": 1, - }, - ], - "codegenNode": undefined, - "components": Array [], - "directives": Array [], - "helpers": Array [], - "hoists": Array [], - "imports": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - "offset": 26, - }, - "source": "", - "start": Object { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "temps": 0, - "type": 0, -} -`; - -exports[`compiler: parse Errors CDATA_IN_HTML_CONTENT 1`] = ` -Object { - "cached": 0, - "children": Array [ - Object { - "children": Array [ - Object { - "content": "[CDATA[cdata]]", - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - "offset": 27, - }, - "source": "", - "start": Object { - "column": 11, - "line": 1, - "offset": 10, - }, - }, - "type": 3, - }, - ], - "codegenNode": undefined, - "isSelfClosing": false, - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - "offset": 38, - }, - "source": "", - "start": Object { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "ns": 0, - "props": Array [], - "tag": "template", - "tagType": 0, - "type": 1, - }, - ], - "codegenNode": undefined, - "components": Array [], - "directives": Array [], - "helpers": Array [], - "hoists": Array [], - "imports": Array [], - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - "offset": 38, - }, - "source": "", - "start": Object { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "temps": 0, - "type": 0, -} -`; - -exports[`compiler: parse Errors CDATA_IN_HTML_CONTENT 1`] = ` -Object { - "cached": 0, - "children": Array [ - Object { - "children": Array [ - Object { - "children": Array [ - Object { - "content": "cdata", - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - "offset": 29, - }, - "source": "cdata", - "start": Object { - "column": 25, - "line": 1, - "offset": 24, - }, - }, - "type": 2, - }, - ], - "codegenNode": undefined, - "isSelfClosing": false, - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - "offset": 38, - }, - "source": "cdata", - "start": Object { - "column": 11, - "line": 1, - "offset": 10, - }, - }, - "ns": 1, - "props": Array [], - "tag": "svg", - "tagType": 0, - "type": 1, - }, - ], - "codegenNode": undefined, - "isSelfClosing": false, - "loc": Object { - "end": Object { - "column": 50, - "line": 1, - "offset": 49, - }, - "source": "", - "start": Object { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "ns": 0, - "props": Array [], - "tag": "template", - "tagType": 0, - "type": 1, - }, - ], - "codegenNode": undefined, - "components": Array [], - "directives": Array [], - "helpers": Array [], - "hoists": Array [], - "imports": Array [], - "loc": Object { - "end": Object { - "column": 50, - "line": 1, - "offset": 49, - }, - "source": "", - "start": Object { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "temps": 0, - "type": 0, -} -`; - -exports[`compiler: parse Errors CHARACTER_REFERENCE_OUTSIDE_UNICODE_RANGE 1`] = ` -Object { - "cached": 0, - "children": Array [ - Object { - "children": Array [ - Object { - "content": "�", - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - "offset": 20, - }, - "source": "�", - "start": Object { - "column": 11, - "line": 1, - "offset": 10, - }, - }, - "type": 2, - }, - ], - "codegenNode": undefined, - "isSelfClosing": false, - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - "offset": 31, - }, - "source": "", - "start": Object { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "ns": 0, - "props": Array [], - "tag": "template", - "tagType": 0, - "type": 1, - }, - ], - "codegenNode": undefined, - "components": Array [], - "directives": Array [], - "helpers": Array [], - "hoists": Array [], - "imports": Array [], - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - "offset": 31, - }, - "source": "", - "start": Object { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "temps": 0, - "type": 0, -} -`; - -exports[`compiler: parse Errors CONTROL_CHARACTER_REFERENCE 1`] = ` -Object { - "cached": 0, - "children": Array [ - Object { - "children": Array [ - Object { - "content": "", - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - "offset": 17, - }, - "source": "", - "start": Object { - "column": 11, - "line": 1, - "offset": 10, - }, - }, - "type": 2, - }, - ], - "codegenNode": undefined, - "isSelfClosing": false, - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - "offset": 28, - }, - "source": "", - "start": Object { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "ns": 0, - "props": Array [], - "tag": "template", - "tagType": 0, - "type": 1, - }, - ], - "codegenNode": undefined, - "components": Array [], - "directives": Array [], - "helpers": Array [], - "hoists": Array [], - "imports": Array [], - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - "offset": 28, - }, - "source": "", - "start": Object { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "temps": 0, - "type": 0, -} -`; - -exports[`compiler: parse Errors CONTROL_CHARACTER_REFERENCE 1`] = ` -Object { - "cached": 0, - "children": Array [ - Object { - "children": Array [ - Object { - "content": "", - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - "offset": 16, - }, - "source": "", - "start": Object { - "column": 11, - "line": 1, - "offset": 10, - }, - }, - "type": 2, - }, - ], - "codegenNode": undefined, - "isSelfClosing": false, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - "offset": 27, - }, - "source": "", - "start": Object { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "ns": 0, - "props": Array [], - "tag": "template", - "tagType": 0, - "type": 1, - }, - ], - "codegenNode": undefined, - "components": Array [], - "directives": Array [], - "helpers": Array [], - "hoists": Array [], - "imports": Array [], - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - "offset": 27, - }, - "source": "", - "start": Object { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "temps": 0, - "type": 0, -} -`; - -exports[`compiler: parse Errors DUPLICATE_ATTRIBUTE 1`] = ` -Object { - "cached": 0, - "children": Array [ - Object { - "children": Array [ - Object { - "children": Array [], - "codegenNode": undefined, - "isSelfClosing": false, - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - "offset": 33, - }, - "source": "
", - "start": Object { - "column": 11, - "line": 1, - "offset": 10, - }, - }, - "ns": 0, - "props": Array [ - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - "offset": 20, - }, - "source": "id=\\"\\"", - "start": Object { - "column": 16, - "line": 1, - "offset": 15, - }, - }, - "name": "id", - "type": 6, - "value": Object { - "content": "", - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - "offset": 20, - }, - "source": "\\"\\"", - "start": Object { - "column": 19, - "line": 1, - "offset": 18, - }, - }, - "type": 2, - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - "offset": 26, - }, - "source": "id=\\"\\"", - "start": Object { - "column": 22, - "line": 1, - "offset": 21, - }, - }, - "name": "id", - "type": 6, - "value": Object { - "content": "", - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - "offset": 26, - }, - "source": "\\"\\"", - "start": Object { - "column": 25, - "line": 1, - "offset": 24, - }, - }, - "type": 2, - }, - }, - ], - "tag": "div", - "tagType": 0, - "type": 1, - }, - ], - "codegenNode": undefined, - "isSelfClosing": false, - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - "offset": 44, - }, - "source": "", - "start": Object { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "ns": 0, - "props": Array [], - "tag": "template", - "tagType": 0, - "type": 1, - }, - ], - "codegenNode": undefined, - "components": Array [], - "directives": Array [], - "helpers": Array [], - "hoists": Array [], - "imports": Array [], - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - "offset": 44, - }, - "source": "", - "start": Object { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "temps": 0, - "type": 0, -} -`; - -exports[`compiler: parse Errors END_TAG_WITH_ATTRIBUTES 1`] = ` +exports[`compiler: parse Errors CDATA_IN_HTML_CONTENT 1`] = ` Object { "cached": 0, "children": Array [ Object { "children": Array [ Object { - "children": Array [], - "codegenNode": undefined, - "isSelfClosing": false, + "content": "[CDATA[cdata]]", "loc": Object { "end": Object { "column": 28, "line": 1, "offset": 27, }, - "source": "
", + "source": "", "start": Object { "column": 11, "line": 1, "offset": 10, }, }, - "ns": 0, - "props": Array [], - "tag": "div", - "tagType": 0, - "type": 1, + "type": 3, }, ], "codegenNode": undefined, @@ -1395,7 +242,7 @@ Object { "line": 1, "offset": 38, }, - "source": "", + "source": "", "start": Object { "column": 1, "line": 1, @@ -1421,7 +268,7 @@ Object { "line": 1, "offset": 38, }, - "source": "", + "source": "", "start": Object { "column": 1, "line": 1, @@ -1433,32 +280,50 @@ Object { } `; -exports[`compiler: parse Errors END_TAG_WITH_TRAILING_SOLIDUS 1`] = ` +exports[`compiler: parse Errors CDATA_IN_HTML_CONTENT 1`] = ` Object { "cached": 0, "children": Array [ Object { "children": Array [ Object { - "children": Array [], + "children": Array [ + Object { + "content": "cdata", + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + "offset": 29, + }, + "source": "cdata", + "start": Object { + "column": 25, + "line": 1, + "offset": 24, + }, + }, + "type": 2, + }, + ], "codegenNode": undefined, "isSelfClosing": false, "loc": Object { "end": Object { - "column": 23, + "column": 39, "line": 1, - "offset": 22, + "offset": 38, }, - "source": "
", + "source": "cdata", "start": Object { "column": 11, "line": 1, "offset": 10, }, }, - "ns": 0, + "ns": 1, "props": Array [], - "tag": "div", + "tag": "svg", "tagType": 0, "type": 1, }, @@ -1467,151 +332,11 @@ Object { "isSelfClosing": false, "loc": Object { "end": Object { - "column": 34, - "line": 1, - "offset": 33, - }, - "source": "", - "start": Object { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "ns": 0, - "props": Array [], - "tag": "template", - "tagType": 0, - "type": 1, - }, - ], - "codegenNode": undefined, - "components": Array [], - "directives": Array [], - "helpers": Array [], - "hoists": Array [], - "imports": Array [], - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - "offset": 33, - }, - "source": "", - "start": Object { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "temps": 0, - "type": 0, -} -`; - -exports[`compiler: parse Errors EOF_BEFORE_TAG_NAME