Bug 34883 - Backslash is converted to Forward Slash
Summary: Backslash is converted to Forward Slash
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-12 01:32 PST by qt-info
Modified: 2010-02-16 19:18 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description qt-info 2010-02-12 01:32:44 PST
When using QWebView to display reports and customizing the HREF value of the <A> tag to have a backslash within it, then QWebView is converting it to a forward slash. 

For example an A tag such as:
<a href="abcd\efghi">my link</a>

Gets interpreted by QWebView as:
<a href="abcd/efghi">my link</a> 

This can be reproduced by saving the link above in an html file and opening that html file in the browser demo located under yourQtVersion/demos.
Comment 1 Alexey Proskuryakov 2010-02-12 12:43:13 PST
Yes, KURL converts backslashes into slashes for most URL schemes. What is the problem with this?
Comment 2 darenchow 2010-02-16 17:14:01 PST
Hi,

This is an issue since we are using the the HREF value for our own internal purposes. For this, the forward slash and backslash are treated differently and used to keep track of different properties held within the link.

Is there any sort of workaround or way to escape this? I have tried \\ but it doesn't seem to work either.

Thanks!
Comment 3 Alexey Proskuryakov 2010-02-16 19:18:24 PST
I don't have sufficient context to give an advice. It's not even clear if the URLs are sent over the wire, or only used internally by some C/C++ code. Generally, data that shouldn't be sent over the wire is encoded as URL fragment (after a "#" character). But for HTML, this can conflict with anchors. One can also use a custom URL scheme instead of file: or http:, and encode the data in arbitrary ways.

For help on using WebKit, please see <http://webkit.org/contact.html>. Closing for now, since there is no indication that this is a bug yet. Please feel free to reopen or comment if you believe that this needs to be tracked as a WebKit bug.