Closed
Bug 537216
Opened 15 years ago
Closed 15 years ago
Unicode URLs are escaped in print titles
Categories
(Core :: Printing: Output, defect)
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
status1.9.2 | --- | .5-fixed |
People
(Reporter: panemade, Assigned: smontagu)
Details
Attachments
(2 files)
286.61 KB,
application/pdf
|
Details | |
1.59 KB,
patch
|
roc
:
review+
beltzner
:
approval1.9.2.2-
christian
:
approval1.9.2.5+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.6) Gecko/20091216 Fedora/3.5.6-1.fc12 Firefox/3.5.6
Build Identifier:
On Fedora 12 system where I have
cairo-1.8.8-3.fc12.x86_64
firefox-3.5.6-1.fc12.x86_64
Reproducible: Always
Steps to Reproduce:
1) start firefox and enter URL http://mr.wikipedia.org
2) print this page as pdf
Actual Results:
Unable to see Unicode string मुखपृष्ठ printed as URL address in pdf
Expected Results:
It should display Unicode string and not its hex representation.
Reporter | ||
Comment 1•15 years ago
|
||
Comment 2•15 years ago
|
||
This should probably be fixed in nsPrintEngine::GetDisplayTitleAndURL().
This function ultimately calls nsIPrintSettings::GetDocURL(), which seems to be implemented by both nsIPrintProgressParams and nsPrintSettings. Both of these return the docURI via ToNewUnicode(), which does nothing but copy the buffer. I believe what is needed to fix this is to call nsTextToSubURI::convertURItoUnicode() which actually decodes a URI to an IRI so that it may be displayed in the print settings properly.
Assignee | ||
Comment 3•15 years ago
|
||
This happens with all printing, not just pdf
Assignee: nobody → smontagu
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Summary: unable to see webpage URL Unicode string in pdf → Unicode URLs are escaped in print titles
Assignee | ||
Comment 4•15 years ago
|
||
I'm not sure if the assumption that the URL is in UTF-8 is safe (though the existing code seems to make the same assumption).
Attachment #419872 -
Flags: review?(roc)
Attachment #419872 -
Flags: review?(roc) → review+
Comment on attachment 419872 [details] [diff] [review]
Patch
+ textToSubURI->UnEscapeURIForUI(nsDependentCString("UTF-8"),
+ urlCStr, unescapedURI);
NS_LITERAL_CSTRING. And check for failure here?
+ } else {
+ *aURLStr = UTF8ToNewUnicode(urlCStr);
+ }
Don't bother. Just return an empty string.
Assignee | ||
Comment 6•15 years ago
|
||
Pushed with those changes: http://hg.mozilla.org/mozilla-central/rev/5562675eab26
Assignee | ||
Updated•15 years ago
|
Flags: in-litmus?
Assignee | ||
Updated•15 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 7•15 years ago
|
||
can this fix be backported on 1.9.2?
Updated•15 years ago
|
Version: unspecified → Trunk
Assignee | ||
Comment 8•15 years ago
|
||
Comment on attachment 419872 [details] [diff] [review]
Patch
Requesting approval1.9.2.1 after trunk baking. This is a big win for UE and usability when printing URLs with non-Latin titles, and the risk is minimal because we're only modifying one string, which is only used within the printing UI.
Attachment #419872 -
Flags: approval1.9.2.1?
Comment 9•15 years ago
|
||
Comment on attachment 419872 [details] [diff] [review]
Patch
We'll take this in 1.9.2.3 when the tree is open for that build; pretty simple patch, nice thing to do for non-Latin alphabeteers.
Attachment #419872 -
Flags: approval1.9.2.3?
Attachment #419872 -
Flags: approval1.9.2.2?
Attachment #419872 -
Flags: approval1.9.2.2-
Comment 10•15 years ago
|
||
Comment on attachment 419872 [details] [diff] [review]
Patch
a=LegNeato for 1.9.2.5. Please ONLY land this on mozilla-1.9.2 default, as we
are still working on 1.9.2.4 on the relbranch
Attachment #419872 -
Flags: approval1.9.2.4? → approval1.9.2.5+
Assignee | ||
Comment 11•15 years ago
|
||
status1.9.2:
--- → .5-fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•