Work around bugs in HTML::Entities, which doesn't output strict utf8, and
DBD::mysql, which doesn't encode high characters correctly. This shows up in the Post synopsis, HTML::splitTag and Post->getSynopsisAndContent.
This commit is contained in:
parent
d6e242f8b2
commit
b89486d5f3
4 changed files with 121 additions and 89 deletions
|
|
@ -434,6 +434,7 @@ sub splitTag {
|
|||
|
||||
while (my $token = $p->get_tag($tag)) {
|
||||
my $text = $p->get_trimmed_text("/$tag");
|
||||
utf8::upgrade($text); ##PATCH to work around HTML::Entities and DBD::mysql
|
||||
next if $text =~ /^([[:space:]]|[[:^print:]])*$/; # skip whitespace
|
||||
push @result, $text; # add the text between the tags to the result array
|
||||
last if @result == $count; # if we have a full count then quit
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue