Changeset 19949 in webkit
- Timestamp:
- Mar 2, 2007 3:02:49 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r19944 r19949 1 2007-03-02 Justin Garcia <justin.garcia@apple.com> 2 3 Reviewed by harrison 4 5 <rdar://problem/4545040> 6 innerHTML does not HTML-escape text nodes inside PRE elements 7 <rdar://problem/5027857> 8 Pasting into Mail from Safari's view-source window renders the HTML 9 10 * editing/pasteboard/5027857-expected.checksum: Added. 11 * editing/pasteboard/5027857-expected.png: Added. 12 * editing/pasteboard/5027857-expected.txt: Added. 13 * editing/pasteboard/5027857.html: Added. 14 1 15 2007-03-02 Justin Garcia <justin.garcia@apple.com> 2 16 -
trunk/WebCore/ChangeLog
r19948 r19949 1 2007-03-02 Justin Garcia <justin.garcia@apple.com> 2 3 Reviewed by harrison 4 5 <rdar://problem/4545040> 6 innerHTML does not HTML-escape text nodes inside PRE elements 7 <rdar://problem/5027857> 8 Pasting into Mail from Safari's view-source window renders the HTML 9 10 * editing/HTMLInterchange.cpp: 11 (WebCore::convertHTMLTextToInterchangeFormat): Send this function 12 the node that the text comes from as a parameter. It shouldn't convert 13 '\n's to spaces/nbsps if the text is coming from text where newlines are 14 preserved. 15 * editing/HTMLInterchange.h: 16 * editing/markup.cpp: 17 (WebCore::startMarkup): Escape text inside the children of PREs. 18 1 19 2007-03-02 Sam Weinig <sam@webkit.org> 2 20 -
trunk/WebCore/editing/HTMLInterchange.cpp
r18712 r19949 29 29 #include "CharacterNames.h" 30 30 #include "Document.h" 31 #include "Text.h" 31 32 #include "TextIterator.h" 32 33 … … 50 51 } // end anonymous namespace 51 52 52 // FIXME: Can't really do this work without taking whitespace mode into account. 53 // This means that eventually this function needs to be eliminated or at least have 54 // its parameters changed because it can't do its work on the string without knowing 55 // what parts are in what whitespace mode. 56 DeprecatedString convertHTMLTextToInterchangeFormat(const DeprecatedString &in) 53 DeprecatedString convertHTMLTextToInterchangeFormat(const DeprecatedString& in, const Text* node) 57 54 { 55 // Assume all the text comes from node. 56 if (node->renderer() && node->renderer()->style()->preserveNewline()) 57 return in; 58 58 59 DeprecatedString s; 59 60 -
trunk/WebCore/editing/HTMLInterchange.h
r15286 r19949 30 30 31 31 class DeprecatedString; 32 class Text; 32 33 33 34 #define AppleInterchangeNewline "Apple-interchange-newline" … … 39 40 enum EAnnotateForInterchange { DoNotAnnotateForInterchange, AnnotateForInterchange }; 40 41 41 DeprecatedString convertHTMLTextToInterchangeFormat(const DeprecatedString& );42 DeprecatedString convertHTMLTextToInterchangeFormat(const DeprecatedString&, const Text*); 42 43 43 44 } -
trunk/WebCore/editing/markup.cpp
r19926 r19949 161 161 if (Node* parent = node->parentNode()) { 162 162 if (parent->hasTagName(listingTag) 163 || parent->hasTagName(preTag)164 163 || parent->hasTagName(scriptTag) 165 164 || parent->hasTagName(styleTag) … … 169 168 } 170 169 bool useRenderedText = annotate && !enclosingNodeWithTag(const_cast<Node*>(node), selectTag); 171 172 170 DeprecatedString markup = useRenderedText ? escapeTextForMarkup(renderedText(node, range), false) : escapeTextForMarkup(stringValueForRange(node, range).deprecatedString(), false); 173 171 if (defaultStyle) { … … 189 187 } 190 188 } 191 return annotate ? convertHTMLTextToInterchangeFormat(markup ) : markup;189 return annotate ? convertHTMLTextToInterchangeFormat(markup, static_cast<const Text*>(node)) : markup; 192 190 } 193 191 case Node::COMMENT_NODE:
Note: See TracChangeset
for help on using the changeset viewer.