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

--> in ng-repeat breaks the compilation #1740

Closed
mhevery opened this issue Dec 20, 2012 · 2 comments
Closed

--> in ng-repeat breaks the compilation #1740

mhevery opened this issue Dec 20, 2012 · 2 comments

Comments

@mhevery
Copy link
Contributor

mhevery commented Dec 20, 2012

http://jsfiddle.net/XGpq4/

The issue is in ngRepeat:

        $compileNode = templateAttrs.$$element =
            jqLite('<!-- ' + directiveName + ': ' + templateAttrs[directiveName]  + ' -->');
        compileNode = $compileNode[0];

and it should be

        $compileNode = templateAttrs.$$element =
            jqLite(document.createComment(directiveName + ': ' + templateAttrs[directiveName]));

This in theory could allow of script injection.

@petebacondarwin
Copy link
Member

Are there other places where similar string concatenation occurs that should be removed?

@mhevery
Copy link
Contributor Author

mhevery commented Jan 10, 2013

Thanks

jamessharp pushed a commit to jamessharp/angular.js that referenced this issue Jan 18, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants