Skip to content

Latest commit

 

History

History
44 lines (40 loc) · 1.08 KB

readme.md

File metadata and controls

44 lines (40 loc) · 1.08 KB

Interpolate incorrect quotes test case

Execute npm i && npm run build and look at the two generated html files.

Expected result for both files (look at the quotes inside the script tags):

<!DOCTYPE html>
<html>
    <head>
        <meta name="description" content="This page contains schema.org information">
        <script type="application/ld+json">
            {
                "name": "This is a \"cool\" webpage",
                "key": "bla 'blub' bla"
            }
        </script>
        <script>
            var str = 'This is the \'best\' string';
        </script>
    </head>
    <body></body>
</html>

But the result for ?interpolate is:

<!DOCTYPE html>
<html>
    <head>
        <meta name="description" content="This page contains schema.org information">
        <script type="application/ld+json">
            {
                "name": "This is a "cool" webpage",
                "key": "bla 'blub' bla"
            }
        </script>
        <script>
            var str = 'This is the 'best' string';
        </script>
    </head>
    <body></body>
</html>