the_path
get_timestamp_by_id
tidy_html clean_html escape_html format_htmltext escape_plaintext strip_by_mode
+ strip_html_tag
get_authors
extract_description
]) {
return $authors;
}
+=head2 strip_html_tag($text)
+
+ strip html tag from text
+
+=cut
+
+sub _strip_html_tag {
+ my ($c, $str) = @_;
+ my $dom = Mojo::DOM->new($str);
+ my $text;
+ if (!$dom) {
+ $c->app->log->error("NewslashHelpers::strip_html_tag: html parse failed: $str");
+ $text = $str;
+ }
+ else {
+ $text = $dom->all_text;
+ }
+}
+
=head2 extract_description($text, $min_length, $max_length)
extract description from text string