Project

General

Profile

Bug #1687

load external images through redirect in HTML version (patch attached)

Added by Boris Nagaev over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
02/11/2013
Due date:
% Done:

0%

Estimated time:

Files

escape-src-and-style.diff (2.74 KB) escape-src-and-style.diff Boris Nagaev, 02/11/2013 03:26 PM
#1

Updated by Koen Deforche over 7 years ago

  • Status changed from New to InProgress
  • Assignee set to Koen Deforche

Hey Starius,

Nice ! I might start to make a habit of leaving TODO trails in the code :-)

I do think that the regular expression needs some more tweaking to handle uri scheme relative urls.

http://stackoverflow.com/questions/3583103/network-path-reference-uri-scheme-relative-urls

Koen

#2

Updated by Boris Nagaev over 7 years ago

Hello!

I did not know about relative uri schemes. Thank you!

BTW "://" is used several times in Wt (not only in proposed patch) to detect external images.

Files:

Wt/Http/Client.C

Wt/WApplication.C (in function encodeUntrustedUrl, which is called from RefEncoder)

web/WebSession.C

web/skeleton/Wt.js (var crossDomain = url.indexOf("://") != --1 and other, seems to be a bug!)

web/RefEncoder.C

web/WebRenderer.C

#3

Updated by Koen Deforche over 7 years ago

  • Status changed from InProgress to Resolved
  • Target version set to 3.3.0

Hey,

You are right about :// being used in other places. Good point, I've reviewed it an fixed where appropriate.

Regards,

koen

#4

Updated by Koen Deforche over 7 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF