-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Angular version to 1.2.12 (Closes #42)
- Loading branch information
Hirav Gandhi
committed
Feb 12, 2014
1 parent
27bf075
commit dce3de7
Showing
11 changed files
with
1,563 additions
and
1,179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module AngularJS | ||
module Rails | ||
VERSION = "1.2.10" | ||
VERSION = "1.2.12" | ||
UNSTABLE_VERSION = "1.1.5" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/** | ||
* @license AngularJS v1.2.10 | ||
* @license AngularJS v1.2.12 | ||
* (c) 2010-2014 Google, Inc. http://angularjs.org | ||
* License: MIT | ||
*/ | ||
|
@@ -104,35 +104,37 @@ var $sanitizeMinErr = angular.$$minErr('$sanitize'); | |
</table> | ||
</div> | ||
</doc:source> | ||
<doc:scenario> | ||
<doc:protractor> | ||
it('should sanitize the html snippet by default', function() { | ||
expect(using('#bind-html-with-sanitize').element('div').html()). | ||
expect(element(by.css('#bind-html-with-sanitize div')).getInnerHtml()). | ||
toBe('<p>an html\n<em>click here</em>\nsnippet</p>'); | ||
}); | ||
it('should inline raw snippet if bound to a trusted value', function() { | ||
expect(using('#bind-html-with-trust').element("div").html()). | ||
expect(element(by.css('#bind-html-with-trust div')).getInnerHtml()). | ||
toBe("<p style=\"color:blue\">an html\n" + | ||
"<em onmouseover=\"this.textContent='PWN3D!'\">click here</em>\n" + | ||
"snippet</p>"); | ||
}); | ||
it('should escape snippet without any filter', function() { | ||
expect(using('#bind-default').element('div').html()). | ||
expect(element(by.css('#bind-default div')).getInnerHtml()). | ||
toBe("<p style=\"color:blue\">an html\n" + | ||
"<em onmouseover=\"this.textContent='PWN3D!'\">click here</em>\n" + | ||
"snippet</p>"); | ||
}); | ||
it('should update', function() { | ||
input('snippet').enter('new <b onclick="alert(1)">text</b>'); | ||
expect(using('#bind-html-with-sanitize').element('div').html()).toBe('new <b>text</b>'); | ||
expect(using('#bind-html-with-trust').element('div').html()).toBe( | ||
element(by.model('snippet')).clear(); | ||
element(by.model('snippet')).sendKeys('new <b onclick="alert(1)">text</b>'); | ||
expect(element(by.css('#bind-html-with-sanitize div')).getInnerHtml()). | ||
toBe('new <b>text</b>'); | ||
expect(element(by.css('#bind-html-with-trust div')).getInnerHtml()).toBe( | ||
'new <b onclick="alert(1)">text</b>'); | ||
expect(using('#bind-default').element('div').html()).toBe( | ||
expect(element(by.css('#bind-default div')).getInnerHtml()).toBe( | ||
"new <b onclick=\"alert(1)\">text</b>"); | ||
}); | ||
</doc:scenario> | ||
</doc:protractor> | ||
</doc:example> | ||
*/ | ||
function $SanitizeProvider() { | ||
|
@@ -537,37 +539,38 @@ angular.module('ngSanitize', []).provider('$sanitize', $SanitizeProvider); | |
</tr> | ||
</table> | ||
</doc:source> | ||
<doc:scenario> | ||
<doc:protractor> | ||
it('should linkify the snippet with urls', function() { | ||
expect(using('#linky-filter').binding('snippet | linky')). | ||
toBe('Pretty text with some links: ' + | ||
'<a href="http://angularjs.org/">http://angularjs.org/</a>, ' + | ||
'<a href="mailto:[email protected]">[email protected]</a>, ' + | ||
'<a href="mailto:[email protected]">[email protected]</a>, ' + | ||
'and one more: <a href="ftp://127.0.0.1/">ftp://127.0.0.1/</a>.'); | ||
expect(element(by.id('linky-filter')).element(by.binding('snippet | linky')).getText()). | ||
toBe('Pretty text with some links: http://angularjs.org/, [email protected], ' + | ||
'[email protected], and one more: ftp://127.0.0.1/.'); | ||
expect(element.all(by.css('#linky-filter a')).count()).toEqual(4); | ||
}); | ||
it ('should not linkify snippet without the linky filter', function() { | ||
expect(using('#escaped-html').binding('snippet')). | ||
toBe("Pretty text with some links:\n" + | ||
"http://angularjs.org/,\n" + | ||
"mailto:[email protected],\n" + | ||
"[email protected],\n" + | ||
"and one more: ftp://127.0.0.1/."); | ||
it('should not linkify snippet without the linky filter', function() { | ||
expect(element(by.id('escaped-html')).element(by.binding('snippet')).getText()). | ||
toBe('Pretty text with some links: http://angularjs.org/, mailto:[email protected], ' + | ||
'[email protected], and one more: ftp://127.0.0.1/.'); | ||
expect(element.all(by.css('#escaped-html a')).count()).toEqual(0); | ||
}); | ||
it('should update', function() { | ||
input('snippet').enter('new http://link.'); | ||
expect(using('#linky-filter').binding('snippet | linky')). | ||
toBe('new <a href="http://link">http://link</a>.'); | ||
expect(using('#escaped-html').binding('snippet')).toBe('new http://link.'); | ||
element(by.model('snippet')).clear(); | ||
element(by.model('snippet')).sendKeys('new http://link.'); | ||
expect(element(by.id('linky-filter')).element(by.binding('snippet | linky')).getText()). | ||
toBe('new http://link.'); | ||
expect(element.all(by.css('#linky-filter a')).count()).toEqual(1); | ||
expect(element(by.id('escaped-html')).element(by.binding('snippet')).getText()) | ||
.toBe('new http://link.'); | ||
}); | ||
it('should work with the target property', function() { | ||
expect(using('#linky-target').binding("snippetWithTarget | linky:'_blank'")). | ||
toBe('<a target="_blank" href="http://angularjs.org/">http://angularjs.org/</a>'); | ||
expect(element(by.id('linky-target')). | ||
element(by.binding("snippetWithTarget | linky:'_blank'")).getText()). | ||
toBe('http://angularjs.org/'); | ||
expect(element(by.css('#linky-target a')).getAttribute('target')).toEqual('_blank'); | ||
}); | ||
</doc:scenario> | ||
</doc:protractor> | ||
</doc:example> | ||
*/ | ||
angular.module('ngSanitize').filter('linky', ['$sanitize', function($sanitize) { | ||
|
Oops, something went wrong.