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

Unified Diff: content/browser/accessibility/browser_accessibility_win.h

Issue 1397183002: Escapes backslash, colon, comma, equals and semicolon in IAccessible2 string attributes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased with master. Created 5 years, 2 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/accessibility/browser_accessibility_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/accessibility/browser_accessibility_win.h
diff --git a/content/browser/accessibility/browser_accessibility_win.h b/content/browser/accessibility/browser_accessibility_win.h
index fdde33e55d046003cbf6338780e9dbb3858c91a8..0cb77443adc93394de75e2c220ff535db16b06f6 100644
--- a/content/browser/accessibility/browser_accessibility_win.h
+++ b/content/browser/accessibility/browser_accessibility_win.h
@@ -13,6 +13,7 @@
#include <vector>
#include "base/compiler_specific.h"
+#include "base/gtest_prod_util.h"
#include "content/browser/accessibility/browser_accessibility.h"
#include "content/common/content_export.h"
#include "third_party/iaccessible2/ia2_api_all.h"
@@ -751,6 +752,14 @@ BrowserAccessibilityWin
ui::AXStringAttribute attribute,
BSTR* value_bstr);
+ // Escapes characters in string attributes as required by the IA2 Spec.
+ // It's okay for input to be the same as output.
+ CONTENT_EXPORT static void SanitizeStringAttributeForIA2(
+ const base::string16& input,
+ base::string16* output);
+ FRIEND_TEST_ALL_PREFIXES(BrowserAccessibilityTest,
+ TestSanitizeStringAttributeForIA2);
+
// If the string attribute |attribute| is present, add its value as an
// IAccessible2 attribute with the name |ia2_attr|.
void StringAttributeToIA2(ui::AXStringAttribute attribute,
« no previous file with comments | « no previous file | content/browser/accessibility/browser_accessibility_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698