| 1 | <!DOCTYPE html> |
| 2 | <html ng-app="myApp"> |
| 3 | <head> |
| 4 | <title>XSS test</title> |
| 5 | </head> |
| 6 | <body> |
| 7 | <h1>XSS test</h1> |
| 8 | <p>expression: {{ value }}</p> |
| 9 | <p translate>translate directive: {{ value }}</p> |
| 10 | |
| 11 | <script src="/bower_components/angular/angular.js"></script> |
| 12 | <script src="/dist/angular-gettext.js"></script> |
| 13 | <script> |
| 14 | angular.module("myApp", ["gettext"]); |
| 15 | |
| 16 | angular.module("myApp").run(function ($rootScope) { |
| 17 | $rootScope.value = "<script>document.write('fa' + 'il');</sc" + "ript>"; |
| 18 | }); |
| 19 | </script> |
| 20 | </body> |
| 21 | </html> |