Skip to content

Commit

Permalink
Add strip_paramattr and strip_urlattr (Internal #669855)
Browse files Browse the repository at this point in the history
tracks internal commit b17b99dff798d2670ed3f8dab58de1727553f5ef
  • Loading branch information
pudge committed Jan 17, 2003
1 parent b46aa21 commit 0001b42
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Slash/Display/Display.pm
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,8 @@ my $strip_mode = sub {
fixparam => \&fixparam,
fixurl => \&fixurl,
fudgeurl => \&fudgeurl,
strip_paramattr => \&strip_paramattr,
strip_urlattr => \&strip_urlattr,
strip_anchor => \&strip_anchor,
strip_attribute => \&strip_attribute,
strip_code => \&strip_code,
Expand Down
15 changes: 15 additions & 0 deletions Slash/Utility/Data/Data.pm
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,21 @@ sub strip_notags { stripByMode($_[0], NOTAGS, @_[1 .. $#_]) }
sub strip_plaintext { stripByMode($_[0], PLAINTEXT, @_[1 .. $#_]) }


#========================================================================

=head2 strip_paramattr(STRING [, NO_WHITESPACE_FIX])
=head2 strip_urlattr(STRING [, NO_WHITESPACE_FIX])
Wrappers for strip_attribute(fixparam($param), $no_whitespace_fix) and
strip_attribute(fudgeurl($url), $no_whitespace_fix).
=cut

sub strip_paramattr { strip_attribute(fixparam($_[0]), $_[1]) }
sub strip_urlattr { strip_attribute(fudgeurl($_[0]), $_[1]) }


#========================================================================

=head2 stripBadHtml(STRING)
Expand Down
9 changes: 9 additions & 0 deletions docs/slashstyle.pod
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,12 @@ is, or where it came from -- inside an HTML attribute value. Example:
Without using strip_attribute, the HTML is now broken, because there will
be extra " inside the tag.

=item strip_paramattr

=item strip_urlattr

These are special versions of strip_attribute which first perform a
fixparam() or fudgeurl() before passing it to strip_attribute.

=item strip_literal

Expand Down Expand Up @@ -1052,6 +1058,9 @@ get/gets/set/sets/create/exists/delete
=head1 CHANGES

$Log$
Revision 1.9 2003/01/17 20:13:25 pudge
Add strip_paramattr and strip_urlattr (Internal #669855)

Revision 1.8 2002/11/04 18:40:48 pudge
Add notes about pipes for filters

Expand Down

0 comments on commit 0001b42

Please sign in to comment.