<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:cgarcia&#64;igalia.com" title="Carlos Garcia Campos &lt;cgarcia&#64;igalia.com&gt;"> <span class="fn">Carlos Garcia Campos</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - URL paths should not be normalized when encoded"
   href="https://bugs.webkit.org/show_bug.cgi?id=144320">bug 144320</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Attachment #251834 Flags</td>
           <td>
               &nbsp;
           </td>
           <td>review?
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - URL paths should not be normalized when encoded"
   href="https://bugs.webkit.org/show_bug.cgi?id=144320#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - URL paths should not be normalized when encoded"
   href="https://bugs.webkit.org/show_bug.cgi?id=144320">bug 144320</a>
              from <span class="vcard"><a class="email" href="mailto:cgarcia&#64;igalia.com" title="Carlos Garcia Campos &lt;cgarcia&#64;igalia.com&gt;"> <span class="fn">Carlos Garcia Campos</span></a>
</span></b>
        <pre>Created <span class=""><a href="attachment.cgi?id=251834&amp;action=diff" name="attach_251834" title="Patch">attachment 251834</a> <a href="attachment.cgi?id=251834&amp;action=edit" title="Patch">[details]</a></span>
Patch

There was a FIXME in TextEncoding::encode() wondering if encode(9 is the best place for the normalization. This bug proves, it indeed depends on the caller, but I think it's very convenient that it happens in encode(), so we can add a parameter to let the caller decide. I've added a text case to URL unit test.

**FAIL** URLTest.URLPathEnconding

../../Tools/TestWebKitAPI/Tests/WebCore/URL.cpp:97
Value of: url.lastPathComponent()
  Actual: test-ni%C3%B1o.png
Expected: encodeWithURLEscapeSequences(path)
Which is: test-nin%CC%83o.png

This is what happens without the patch.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>