| Index: tools/grit/grit/tool/xmb.py
|
| diff --git a/tools/grit/grit/tool/xmb.py b/tools/grit/grit/tool/xmb.py
|
| index 0e7950ccde1e237eec79b5e115ff9d7e95ce26f1..c25dbf143d1a3c2bfbc5d2c8054578336800940a 100755
|
| --- a/tools/grit/grit/tool/xmb.py
|
| +++ b/tools/grit/grit/tool/xmb.py
|
| @@ -28,11 +28,6 @@ _XML_QUOTE_ESCAPES = {
|
| u"'": u''',
|
| u'"': u'"',
|
| }
|
| -# See http://www.w3.org/TR/xml/#charsets
|
| -_XML_BAD_CHAR_REGEX = lazy_re.compile(u'[^\u0009\u000A\u000D'
|
| - u'\u0020-\uD7FF\uE000-\uFFFD'
|
| - u'\U00010000-\U0010FFFF]')
|
| -
|
|
|
| def _XmlEscape(s):
|
| """Returns text escaped for XML in a way compatible with Google's
|
| @@ -41,12 +36,7 @@ def _XmlEscape(s):
|
| """
|
| if not type(s) == unicode:
|
| s = unicode(s)
|
| - result = saxutils.escape(s, _XML_QUOTE_ESCAPES)
|
| - illegal_chars = _XML_BAD_CHAR_REGEX.search(result)
|
| - if illegal_chars:
|
| - raise Exception('String contains characters disallowed in XML: %s' %
|
| - repr(result))
|
| - return result.encode('utf-8')
|
| + return saxutils.escape(s, _XML_QUOTE_ESCAPES).encode('utf-8')
|
|
|
|
|
| def _WriteAttribute(file, name, value):
|
|
|