BorisMoore / jsviews

Interactive data-driven views, MVVM and MVP, built on top of JsRender templates
http://www.jsviews.com/#jsviews
MIT License
857 stars 130 forks source link

svg path syntax error on link #263

Closed janosch715 closed 10 years ago

janosch715 commented 10 years ago

Hi Boris, at first I want to thank you for sharing your great work.

A syntax error occurs if in a template a path tag is included in a svg like this <path ../>. If <path ...>...</path> is used everything works fine. Please see http://jsfiddle.net/tQnVt/340/

The error in the console:

JsViews Error: Syntax error
'<path.../>' in:
#1_`

    <svg height="210" width="400">
        <path d="M150 0 L75 200 L225 200 Z" />
    </svg>

    <p>
    hello
    </p>
    <ul>
    #2_`#3_`
        <li>red</li>
    /3_`#4_`
        <li>yellow</li>
    /4_`#5_`
        <li>blue</li>
    /5_`/2_`
    </ul>
/1_`
BorisMoore commented 10 years ago

Thanks for calling this out. I'll look into whether this can be optimized to detect 'foreign elements' that can be void/self-closing.

BorisMoore commented 10 years ago

This has been fixed in commit 54. The jsfiddle now works.