зеркало из https://github.com/mozilla/pjs.git
Bug 344207 - Can't use colons in link URLs. Fix adds colons to the regular expression in Litmus::StripScripts. Presumably, we want to consider sending this upstream to the real StripScripts developers.
This commit is contained in:
Родитель
7683206a66
Коммит
235c2c9b52
|
@ -37,7 +37,7 @@ use base qw(HTML::StripScripts::Parser);
|
|||
sub validate_href_attribute {
|
||||
my ($self, $text) = @_;
|
||||
|
||||
$self->SUPER::validate_href_attribute or $text =~ m<^((https?|ftp|mailto)://[\w\-\.]{1,100}(?:\:\d{1,5})?(?:/(?:[\w\-.!~*|;/?=+\$\,%#]|&){0,100})?)$>x ? $1 : undef;
|
||||
$self->SUPER::validate_href_attribute or $text =~ m<^((https?|ftp|mailto)://[\w\-\.]{1,100}(?:\:\d{1,5})?(?:/(?:[\w\-.!~*|;:/?=+\$\,%#]|&){0,100})?)$>x ? $1 : undef;
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
Загрузка…
Ссылка в новой задаче