Skip to content

Commit 23d4a81

Browse files
committed
verify-code-snippets.pl: decode   to space
This is an extension of the   hack. For some reason, MediaWiki encodes some spaces as  , which must be decoded back to spaces.
1 parent 9643e93 commit 23d4a81

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

verify-code-snippets.pl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ ($)
4444

4545
# decode encoded HTML characters (e.g., '&' -> '&')
4646
for (my $pageIndex = 0; $pageIndex < @page; $pageIndex++) {
47-
# HACK: decode '&nbsp;' -> ' ' (not 0xa0)
47+
# HACK: decode '&nbsp;' and '&#160;' to ' ' (not 0xa0 or similar)
4848
$page[$pageIndex] =~ s/&nbsp;/ /g;
49+
$page[$pageIndex] =~ s/&#160;/ /g;
4950

5051
$page[$pageIndex] = decode_entities($page[$pageIndex]);
5152
}

0 commit comments

Comments
 (0)