Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proper handling of data: links #58

Open
GoogleCodeExporter opened this issue Mar 13, 2015 · 0 comments
Open

Proper handling of data: links #58

GoogleCodeExporter opened this issue Mar 13, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

Links that have data directly embedded in them are not handled correctly by 
wawp.php. For instance, image data can be streamed inline by using the data: 
prefix for link. Fix provided below.

What steps will reproduce the problem?
1. Navigate to http://www.google.com/news
2. Notice that the square thumbnail images for the news stories are broken.

What is the expected output? What do you see instead?
Images that are linked with a data: prefix (instead of a http: prefix) should 
be rendered correctly. Instead, a broken image icon is displayed.

What version of the product are you using? On what operating system?
WebAnywhere Beta and current version from SVN.

Please provide any additional information below.
This can be fixed by updating the complete_url() function in wawp. Add an extra 
switch/case statement specifically for data prefixes. After "case 'm'" add:

      case 'd':
        // Handle data links; used for small images
        if(substr($url, 0, 5) == 'data:') {
          $proxify = false;
          break;
        }

Original issue reported on code.google.com by [email protected] on 13 Apr 2011 at 9:45

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant