Changeset 232202 in webkit


Ignore:
Timestamp:
May 25, 2018 2:35:13 PM (6 years ago)
Author:
eric.carlson@apple.com
Message:

Encode ISOWebVTTCue "strings" when logging
https://bugs.webkit.org/show_bug.cgi?id=185991
<rdar://problem/40563902>

Reviewed by Jer Noble.

  • platform/graphics/iso/ISOVTTCue.cpp:

(WebCore::ISOWebVTTCue::toJSONString const): Use encodeWithURLEscapeSequences for all Strings
taken from ISO boxes.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r232198 r232202  
     12018-05-25  Eric Carlson  <eric.carlson@apple.com>
     2
     3        Encode ISOWebVTTCue "strings" when logging
     4        https://bugs.webkit.org/show_bug.cgi?id=185991
     5        <rdar://problem/40563902>
     6
     7        Reviewed by Jer Noble.
     8
     9        * platform/graphics/iso/ISOVTTCue.cpp:
     10        (WebCore::ISOWebVTTCue::toJSONString const): Use encodeWithURLEscapeSequences for all Strings
     11        taken from ISO boxes.
     12
    1132018-05-25  Alex Christensen  <achristensen@webkit.org>
    214
  • trunk/Source/WebCore/platform/graphics/iso/ISOVTTCue.cpp

    r231490 r232202  
    2828
    2929#include "Logging.h"
    30 #include <JavaScriptCore/ArrayBuffer.h>
     30#include "URL.h"
    3131#include <JavaScriptCore/DataView.h>
    32 #include <JavaScriptCore/Int8Array.h>
    33 #include <JavaScriptCore/JSCInlines.h>
    34 #include <JavaScriptCore/TypedArrayInlines.h>
    3532#include <wtf/JSONValues.h>
    36 #include <wtf/NeverDestroyed.h>
    37 #include <wtf/text/CString.h>
    38 #include <wtf/text/StringBuilder.h>
    3933
    4034using JSC::DataView;
     
    6054
    6155        Vector<LChar> characters;
    62         characters.reserveInitialCapacity((size_t)characterCount);
     56        characters.reserveInitialCapacity(static_cast<size_t>(characterCount));
    6357        while (characterCount--) {
    6458            int8_t character = 0;
     
    118112    object->setString(ASCIILiteral("text"), m_cueText);
    119113#endif
    120     object->setString(ASCIILiteral("sourceId"), m_sourceID);
    121     object->setString(ASCIILiteral("id"), m_identifier);
     114    object->setString(ASCIILiteral("sourceId"), encodeWithURLEscapeSequences(m_sourceID));
     115    object->setString(ASCIILiteral("id"), encodeWithURLEscapeSequences(m_identifier));
    122116
    123     object->setString(ASCIILiteral("originalStartTime"), m_originalStartTime);
    124     object->setString(ASCIILiteral("settings"), m_settings);
    125     object->setString(ASCIILiteral("cueText"), m_cueText);
     117    object->setString(ASCIILiteral("originalStartTime"), encodeWithURLEscapeSequences(m_originalStartTime));
     118    object->setString(ASCIILiteral("settings"), encodeWithURLEscapeSequences(m_settings));
    126119
    127120    object->setDouble(ASCIILiteral("presentationTime"), m_presentationTime.toDouble());
Note: See TracChangeset for help on using the changeset viewer.