#789 Poorly formed search queries cause malformed XHTML in Firefo

6.95
open
nobody
5
2014-08-26
2010-02-23
No

One of my awstats pages is producing an XML Parsing Error in Firefox.

THe offending HTML output is

  



Search Keyphrases (Top 10)
Full list
 
2 different keyphrasesSearchPercent
����� �����150 %
sheltie collie150 %

 

Search Keywords (Top 10)
Full list
 
4 different keywordsSearchPercent
collie125 %
sheltie125 %
�����125 %
�����125 %

and the offending data file segment (the entire data file is attached) generating that output is:

<sortfor>10</sortfor><comment> # Search keyphrases - Number of search # The 10 first number of search must be first (order not required for others) </comment><nu> BEGIN_SEARCHWORDS</nu><recnb>2</recnb>
%e3%ee%eb%fb%e5+%f2%e5%eb%ea%e81
sheltie+collie1
<nu>END_SEARCHWORDS </nu>
<sortfor>10</sortfor><comment> # Search keywords - Number of search # The 10 first number of search must be first (order not required for others) </comment><nu> BEGIN_KEYWORDS</nu><recnb>4</recnb>
collie1
sheltie1
%e3%ee%eb%fb%e51
%f2%e5%eb%ea%e81
<nu>END_KEYWORDS </nu>

Discussion

  • Bruno Friedmann

    Bruno Friedmann - 2010-05-01

    Found exactly the same thing with
    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
    <meta name="generator" content="AWStats 6.95 (build 1.943) from config file awstats.www.differences-solidaires.ch.conf (http://awstats.sourceforge.net)"/>

    différence solidairement11.5 % ����� ���������11.5 % tandem ski11.5 %

    This is quite annoying to have customer call asking why their stats doesn't work !
    Can we have an idea where to search to reject this type of line ?

     
  • Bruno Friedmann

    Bruno Friedmann - 2010-05-01

    Found in awstats.txt data file there often a string like that
    %ef%e5%f7%e0%f2%fc+%eb%e8%f1%f2%ee%e2%ee%ea
    in BEGIN_SEARCHWORD section

     
  • valkyr

    valkyr - 2010-05-15

    It seems that AWStats doesn't filter characters that are invalid in XML, so any keywords or keyphrases containing such characters will break the XML output. I've got the keys "����������������" and "�����" in my logs doing just that.

    The easiest fix for now is to set :

    ShowKeyphrasesStats=0
    ShowKeywordsStats=0

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks