Forum: Fixed XML bug in 'Searches' with encoding

 

« Back To Thread List

landerretche
2850 days ago
If a search engine include bad encoding requests, the ajax call failed.
To fix this bug :
> open clsAWStats.php
> add function in class
function cleanstring($data) {
$specials=array(9,10,11,13);
$forbiden=array(0,34,44,96);
$result="";
if (trim($data)=="") return $result;
for ($i=0; $i=32 and $ord modify function CreateXMLString, with for-loop content replacement :
$stmp=htmlspecialchars(urldecode(trim($arrData[$iIndexItem][$iIndexAttr])));
$stmp=$this->cleanstring($stmp);
$sTemp .= $this->arrLabel[$sSection][$iIndexAttr] . "=\"" . $stmp . "\" ";


Bug fixed by Serge Landerretche - Network-Consulting.fr - Feb 2011
mbsouth
2844 days ago
Thx landerretche for the post above.
It seems, the code above isnĀ“t completly.
Can I get it elsewhere?
mbsouth
2844 days ago
There is a small bug in "This Month" too.
Get a javascript error if no data is available for "This Month".

Javascript: dtMaxDate is undefined in jawstats.js
darioj
2782 days ago
The solution is the thread below which states to fix blank pages / loop but it actually solves the encoding problem

http://www.jawstats.com/community/thread119

Dario

« Back To Thread List

Participate in this discussion

 

You must be logged in to post in this thread.

 

Version 0.7 beta available now

Released 25th Janury 2009

Try the online demo or download now.

 
Latest JAWStats News:

Version 0.7 Beta Released

Sprechen Sie Deutsch? Multi-lingual JAWStats v0.7 is finally here.

posted 25th Jan '09. read more »
 

Help JAWStats

Please donate a dollar (or more!) towards the hosting costs for this site. This money doesn't go anywhere near my pocket, it is purely used against my hosting bill.

 

Get $50 off your webhosting

You could do far worse than choose Dreamhost. I've used them for 6 years and they're great. Simply enter the promo code: JAWSTATS on signup!