Commit 7b22c65b authored by sullivan@apple.com's avatar sullivan@apple.com

2009-04-28 John Sullivan <sullivan@apple.com>

        <rdar://problem/6820221> REGRESSION: 2-byte character names of images are displayed as %-encoded ASCII

        Reviewed by Adam Roben

        * loader/ImageDocument.cpp:
        (WebCore::ImageTokenizer::finish):
        decode the filename before processing it as part of the image name that's passed to the client



git-svn-id: svn://svn.chromium.org/blink/trunk@42930 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent c02c9232
2009-04-28 John Sullivan <sullivan@apple.com>
<rdar://problem/6820221> REGRESSION: 2-byte character names of images are displayed as %-encoded ASCII
Reviewed by Adam Roben
* loader/ImageDocument.cpp:
(WebCore::ImageTokenizer::finish):
decode the filename before processing it as part of the image name that's passed to the client
2009-04-28 Maciej Stachowiak <mjs@apple.com>
Not reviewed, build fix.
......@@ -126,9 +126,9 @@ void ImageTokenizer::finish()
IntSize size = cachedImage->imageSize(m_doc->frame()->pageZoomFactor());
if (size.width()) {
// Compute the title, we use the filename of the resource, falling
// back on the hostname if there is no path.
String fileName = m_doc->url().lastPathComponent();
// Compute the title, we use the decoded filename of the resource, falling
// back on the (decoded) hostname if there is no path.
String fileName = decodeURLEscapeSequences(m_doc->url().lastPathComponent());
if (fileName.isEmpty())
fileName = m_doc->url().host();
m_doc->setTitle(imageTitle(fileName, size));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment