aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2015-06-14 03:09:08 -0400
committerTeddy Wing2015-06-14 03:09:43 -0400
commit76cb0b5f31a9c2a68d820a8f37cc0048d972f7ba (patch)
treee83a42b70c4c6759c6f092b8439f3e3183ba4532
parent291435bb1da4f9bb043f7d134a998ad067655a4f (diff)
downloadirssi-hipchat-stfu-76cb0b5f31a9c2a68d820a8f37cc0048d972f7ba.tar.bz2
prettify_hipchat: Remove HTML tags
And add some comments to describe what we're matching.
-rw-r--r--hipchat-stfu.pl5
1 files changed, 5 insertions, 0 deletions
diff --git a/hipchat-stfu.pl b/hipchat-stfu.pl
index aa992a3..c23b678 100644
--- a/hipchat-stfu.pl
+++ b/hipchat-stfu.pl
@@ -15,7 +15,12 @@ $VERSION = '1.00';
sub prettify_hipchat {
my ($input) = @_;
+ # Remove HTML tags
+ $input =~ s/<.+?>//g;
+
+ # Trim whitespace
$input =~ s/^(\s| )+|(\s| )+$//g;
+
return $input;
};