Changeset 150238 in webkit


Ignore:
Timestamp:
May 16, 2013 8:20:24 PM (11 years ago)
Author:
mifenton@rim.com
Message:

[BlackBerry] Strip invoke URLs when writing to the clipboard.
https://bugs.webkit.org/show_bug.cgi?id=116226

Reviewed by Rob Buis.

PR 333516.

Invoke URLs should not be included in the paste data.

Internally Reviewed by Gen Mak.

  • platform/blackberry/PasteboardBlackBerry.cpp:

(WebCore::Pasteboard::writeSelection):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r150236 r150238  
     12013-05-16  Mike Fenton  <mifenton@rim.com>
     2
     3        [BlackBerry] Strip invoke URLs when writing to the clipboard.
     4        https://bugs.webkit.org/show_bug.cgi?id=116226
     5
     6        Reviewed by Rob Buis.
     7
     8        PR 333516.
     9
     10        Invoke URLs should not be included in the paste data.
     11
     12        Internally Reviewed by Gen Mak.
     13
     14        * platform/blackberry/PasteboardBlackBerry.cpp:
     15        (WebCore::Pasteboard::writeSelection):
     16
    1172013-05-16  Eduardo Lima Mitev  <elima@igalia.com>
    218
  • trunk/Source/WebCore/platform/blackberry/PasteboardBlackBerry.cpp

    r146835 r150238  
    6666    WTF::String text = shouldSerializeSelectedTextForClipboard == IncludeImageAltTextForClipboard ? frame->editor()->selectedTextForClipboard() : frame->editor()->selectedText();
    6767    WTF::String html = createMarkup(selectedRange, 0, AnnotateForInterchange);
     68    DEFINE_STATIC_LOCAL(AtomicString, invokeString, ("href=\"invoke://"));
     69    size_t startOfInvoke = html.find(invokeString);
     70    if (startOfInvoke != notFound) {
     71        size_t endOfInvoke = html.find("\"", startOfInvoke + invokeString.length()) + 1;
     72        html.remove(startOfInvoke, endOfInvoke - startOfInvoke);
     73    }
    6874    WTF::String url = frame->document()->url().string();
    6975
Note: See TracChangeset for help on using the changeset viewer.