E
E
Egor Zuzlov2019-04-28 21:29:42
webpack
Egor Zuzlov, 2019-04-28 21:29:42

What causes this error and how to solve it?

Hello, I encountered such an error that the following code is inserted into HTML ...

<parsererror style="display: block; white-space: pre; border: 2px solid #c77; padding: 0 1em 0 1em; margin: 1em; background-color: #fdd; color: black">
  <h3>This page contains the following errors:</h3>
  <div style="font-family:monospace;font-size:12px">error on line 4 at column 14: Opening and ending tag mismatch: path line 0 and symbol</div>
  <h3>Below is a rendering of the page up to the first error.</h3>
</parsererror>

...this appeared after I rendered the svg via an iframe...
iframe.js-iframeSvg(src="./assets/svg/icons.svg", onload="this.before(this.contentDocument.children[0]); this.remove();")

(self svg)
<svg class="d-none" aria-hidden="true">
    <symbol id="icon-logo" viewBox="0 0 512 512">
        <path d="*секрет*">
    </symbol>
</svg>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Proskurin, 2019-04-28
@londers

SVG is not HTML, it's XML, so all tags must be closed.
<path d="*секрет*" />

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question