mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-16 21:00:40 -07:00
fix(strip_html): infinite loop for strip_html
This commit is contained in:
@@ -85,5 +85,9 @@ describe('filters/html', function () {
|
||||
expect(liquid.parseAndRenderSync('{{"<img\rsrc=x\ronerror=alert(1)>" | strip_html}}')).toBe('')
|
||||
expect(liquid.parseAndRenderSync('{{"<svg\nonload=alert(1)>" | strip_html}}')).toBe('')
|
||||
})
|
||||
it('should not loop on unclosed openers (GHSA-m7fp-h3p4-hr49)', function () {
|
||||
expect(liquid.parseAndRenderSync('{{ "a<" | strip_html }}')).toBe('a<')
|
||||
expect(liquid.parseAndRenderSync('{{ "hello<world<again" | strip_html }}')).toBe('hello<world<again')
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user