Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Parser problem #221

Closed
sirdarckcat opened this issue Jan 8, 2011 · 2 comments
Closed

Parser problem #221

sirdarckcat opened this issue Jan 8, 2011 · 2 comments

Comments

@sirdarckcat
Copy link

Try:
1<script>x</script><b>2</b><script>x</script>3

In:
http://code.angularjs.org/latest/docs/index.html#!angular.filter.html

The expected output is:
123

The generated output:
13

@sirdarckcat
Copy link
Author

to fix this, in sanitizer.js:

  html = html.replace(new RegExp("(.*)<\\s*\\/\\s*" + stack.last() + "[^>]*>", 'i'), function(all, text){

should be:

  html = html.replace(new RegExp("(.*?)<\\s*\\/\\s*" + stack.last() + "[^>]*>", 'i'), function(all, text){

@sirdarckcat
Copy link
Author

oh wtf I closed this by mistake

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant