Skip to content

Proper handling of data: links #58

Description

@GoogleCodeExporter
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 smur...@gmail.com on 13 Apr 2011 at 9:45

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions