In wwwroot/cgi-bin/awstats.pl circa line 1316 newlines are converted to <br> elements. But the syntax of both the Perl substitution operator replacement string and the string it produces are incorrect.
$messagestring =~ s/\n/\<br\>/g;
First, the backslashes in the replacement string are not needed. Second, this produces a <br> element using the HTML syntax, namely <br>. If one is generating XHTML output this fails pretty spectacularly. (The correct syntax in XHTML is <br/>, but any amount of whitespace is permitted between the GI (“br”) and the “/>”, and there are some browsers that barf if the amount of whitespace is none, so most people use <br />, as indeed this routine does elsewhere.)
I expect to submit a PR for this in the next few minutes.
In wwwroot/cgi-bin/awstats.pl circa line 1316 newlines are converted to
<br>
elements. But the syntax of both the Perl substitution operator replacement string and the string it produces are incorrect.First, the backslashes in the replacement string are not needed. Second, this produces a
<br>
element using the HTML syntax, namely<br>
. If one is generating XHTML output this fails pretty spectacularly. (The correct syntax in XHTML is<br/>
, but any amount of whitespace is permitted between the GI (“br”) and the “/>”, and there are some browsers that barf if the amount of whitespace is none, so most people use<br />
, as indeed this routine does elsewhere.)I expect to submit a PR for this in the next few minutes.