CMUBigLab / webanywhere

Accessible Technology Anywhere
http://webanywhere.cs.washington.edu/beta/
Other
17 stars 7 forks source link

find a cleaner solution to deal with location.replace #47

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In wawp.php, there is such line, which will make the javascript method
string.replace unusable. What's the purpose of this line? I would like
to comment it out. Thanks!

 $_response_body = preg_replace('#\.replace\(([^\/])#is', '.rep($1',
$_response_body);

=====
This is a heuristic for getting rid of Javascript of the form
location.replace() which can cause WA to lose control of the page.

We'd obviously prefer a cleaner solution than this, but it sort of works.

=====
So, find a better solution to fix this.

Original issue reported on code.google.com by hgn...@gmail.com on 29 Apr 2010 at 5:01