Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Side by Side Diff: net/base/escape.h

Issue 681713002: Update from chromium https://crrev.com/301315 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « mojo/tools/roll/skia_build.patch ('k') | net/base/escape.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_BASE_ESCAPE_H_ 5 #ifndef NET_BASE_ESCAPE_H_
6 #define NET_BASE_ESCAPE_H_ 6 #define NET_BASE_ESCAPE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 24 matching lines...) Expand all
35 // Space is escaped as + (if use_plus is true) and other special characters 35 // Space is escaped as + (if use_plus is true) and other special characters
36 // as %XX (hex). 36 // as %XX (hex).
37 NET_EXPORT std::string EscapeUrlEncodedData(const std::string& path, 37 NET_EXPORT std::string EscapeUrlEncodedData(const std::string& path,
38 bool use_plus); 38 bool use_plus);
39 39
40 // Escapes all non-ASCII input. 40 // Escapes all non-ASCII input.
41 NET_EXPORT std::string EscapeNonASCII(const std::string& input); 41 NET_EXPORT std::string EscapeNonASCII(const std::string& input);
42 42
43 // Escapes characters in text suitable for use as an external protocol handler 43 // Escapes characters in text suitable for use as an external protocol handler
44 // command. 44 // command.
45 // We %XX everything except alphanumerics and %-_.!~*'() and the restricted 45 // We %XX everything except alphanumerics and -_.!~*'() and the restricted
46 // chracters (;/?:@&=+$,). 46 // chracters (;/?:@&=+$,#[]) and a valid percent escape sequence (%XX).
47 NET_EXPORT std::string EscapeExternalHandlerValue(const std::string& text); 47 NET_EXPORT std::string EscapeExternalHandlerValue(const std::string& text);
48 48
49 // Appends the given character to the output string, escaping the character if 49 // Appends the given character to the output string, escaping the character if
50 // the character would be interpretted as an HTML delimiter. 50 // the character would be interpretted as an HTML delimiter.
51 NET_EXPORT void AppendEscapedCharForHTML(char c, std::string* output); 51 NET_EXPORT void AppendEscapedCharForHTML(char c, std::string* output);
52 52
53 // Escapes chars that might cause this text to be interpretted as HTML tags. 53 // Escapes chars that might cause this text to be interpretted as HTML tags.
54 NET_EXPORT std::string EscapeForHTML(const std::string& text); 54 NET_EXPORT std::string EscapeForHTML(const std::string& text);
55 NET_EXPORT base::string16 EscapeForHTML(const base::string16& text); 55 NET_EXPORT base::string16 EscapeForHTML(const base::string16& text);
56 56
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 UnescapeRule::Type rules, 129 UnescapeRule::Type rules,
130 base::OffsetAdjuster::Adjustments* adjustments); 130 base::OffsetAdjuster::Adjustments* adjustments);
131 131
132 // Unescapes the following ampersand character codes from |text|: 132 // Unescapes the following ampersand character codes from |text|:
133 // &lt; &gt; &amp; &quot; &#39; 133 // &lt; &gt; &amp; &quot; &#39;
134 NET_EXPORT base::string16 UnescapeForHTML(const base::string16& text); 134 NET_EXPORT base::string16 UnescapeForHTML(const base::string16& text);
135 135
136 } // namespace net 136 } // namespace net
137 137
138 #endif // NET_BASE_ESCAPE_H_ 138 #endif // NET_BASE_ESCAPE_H_
OLDNEW
« no previous file with comments | « mojo/tools/roll/skia_build.patch ('k') | net/base/escape.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698