-
Notifications
You must be signed in to change notification settings - Fork 381
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Will revert: test if reverting this branch's diff makes tests pass
- Loading branch information
Showing
3 changed files
with
24 additions
and
242 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
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 |
---|---|---|
|
@@ -1256,23 +1256,27 @@ static function() { | |
[ AMP_Tag_And_Attribute_Sanitizer::INVALID_URL_PROTOCOL ], | ||
], | ||
|
||
'a_with_space_in_url' => [ | ||
'a_with_wrong_host' => [ | ||
'<a class="foo" href="http://foo bar">value</a>', | ||
'<a class="foo" href="http://foo%20bar">value</a>', | ||
'<a class="foo">value</a>', | ||
[], | ||
[ AMP_Tag_And_Attribute_Sanitizer::INVALID_URL ], | ||
], | ||
'a_with_encoded_host' => [ | ||
'<a class="foo" href="http://%65%78%61%6d%70%6c%65%2e%63%6f%6d/foo/">value</a>', | ||
null, | ||
], | ||
'a_with_spaces_inside' => [ | ||
'<a class="foo" href="//domain with space.com/foo">value</a>', | ||
'<a class="foo" href="//domain%20with%20space.com/foo">value</a>', | ||
], | ||
'a_with_schemaless_host' => [ | ||
'<a class="foo" href="//domain.om/foo">value</a>', | ||
'a_with_wrong_schemeless_host' => [ | ||
'<a class="foo" href="//bad domain with a space.com/foo">value</a>', | ||
'<a class="foo">value</a>', | ||
[], | ||
[ AMP_Tag_And_Attribute_Sanitizer::INVALID_URL ], | ||
], | ||
'a_with_mail_host' => [ | ||
'<a class="foo" href="mailto:[email protected]">value</a>', | ||
'<a class="foo" href="mail to:[email protected]">value</a>', | ||
'<a class="foo">value</a>', | ||
[], | ||
[ AMP_Tag_And_Attribute_Sanitizer::INVALID_URL_PROTOCOL ], | ||
], | ||
|
||
// font is removed so we should check that other elements are checked as well. | ||
|