Skip to content

benurb/html-loader-escape-bug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published