Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apply_escapes doesn't complain if you pass in no flags #11

Open
autarch opened this issue May 16, 2020 · 0 comments
Open

apply_escapes doesn't complain if you pass in no flags #11

autarch opened this issue May 16, 2020 · 0 comments

Comments

@autarch
Copy link
Member

autarch commented May 16, 2020

Migrated from rt.cpan.org #67972 (status was 'new')

Requestors:

From [email protected] on 2011-05-05 17:58:43
:

sub apply_escapes
{
my $self = shift;
my $text = shift;

foreach my $flag (@_)
{  
    param_error "Invalid escape flag: $flag"
        unless exists $self->{escapes}{$flag};

    $self->{escapes}{$flag}->(\$text);
}

return $text;

}

It'd be nice if Mason generated a warning or error if @_ == 0, because
there seems to be a strong expectation that you don't need any flag to
get HTML escaping or something.

Shawn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant