[webanywhere-dev] Why substitute "replace" with "rep" in wawp.php?

4 views
Skip to first unread message

Cameron Wong

unread,
Apr 17, 2010, 3:37:15 AM4/17/10
to webanyw...@googlegroups.com
Hi Jeff,

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);

Cameron

--
You received this message because you are subscribed to the Google Groups "webanywhere-dev" group.
To post to this group, send email to webanyw...@googlegroups.com.
To unsubscribe from this group, send email to webanywhere-d...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/webanywhere-dev?hl=en.

Jeffrey P. Bigham

unread,
Apr 26, 2010, 10:16:37 AM4/26/10
to webanywhere-dev
Hi Cameron,

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.

Thanks,
Jeff
--
Jeffrey P. Bigham, Ph.D.
Department of Computer Science
University of Rochester
http://www.jeffreybigham.com

Creator of WebAnywhere:
http://webanywhere.cs.washington.edu
Reply all
Reply to author
Forward
0 new messages