<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Tapping and holding a link should have a share option"
   href="https://bugs.webkit.org/show_bug.cgi?id=150693#c8">Comment # 8</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Tapping and holding a link should have a share option"
   href="https://bugs.webkit.org/show_bug.cgi?id=150693">bug 150693</a>
              from <span class="vcard"><a class="email" href="mailto:mitz&#64;webkit.org" title="mitz&#64;webkit.org &lt;mitz&#64;webkit.org&gt;"> <span class="fn">mitz&#64;webkit.org</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=264406&amp;action=diff" name="attach_264406" title="Patch">attachment 264406</a> <a href="attachment.cgi?id=264406&amp;action=edit" title="Patch">[details]</a></span>
Patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=264406&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=264406&amp;action=review</a>

<span class="quote">&gt; Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:3388
&gt; +        [_textSelectionAssistant showShareSheetFor:[url absoluteString] fromRect:boundingRect];
&gt; +    else if (_webSelectionAssistant &amp;&amp; [_webSelectionAssistant respondsToSelector:&#64;selector(showShareSheetFor:fromRect:)])
&gt; +        [_webSelectionAssistant showShareSheetFor:[url absoluteString] fromRect:boundingRect];</span >

Do these strings get interpreted as URLs by some code on the other side of this API, or do they end up being presented to the user? If it’s the latter, then we shouldn’t use -absoluteString, because it doesn’t give a good representation of certain URLs, such as ones with non-ASCII characters in the host or the path. Instead, -_web_userVisibleString should work. If these strings do get turned back into URLs, and we can’t use an alternative API that takes NSURLs, then we should consider using -_web_originalDataAsString here and the reverse transformation on the receiving end.

<span class="quote">&gt;&gt; Source/WebKit2/UIProcess/ios/WKPDFView.mm:727
&gt;&gt; +        [_webSelectionAssistant showShareSheetFor:[url absoluteString] fromRect:boundingRect];
&gt; 
&gt; url.absoluteString (and above too)</span >

Same comment here.</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>