Use twisted's escapeToXml

This commit is contained in:
Sajith Sasidharan 2020-08-19 15:42:01 -04:00
parent 9882d22101
commit ce994ff246

View File

@ -13,7 +13,7 @@ from twisted.internet.task import Clock
from twisted.web import client, error, http
from twisted.python import failure, log
from nevow.util import escapeToXML
from twisted.words.xish.domish import escapeToXml
from allmydata import interfaces, uri, webish
from allmydata.storage_client import StorageFarmBroker, StubServer
@ -365,9 +365,9 @@ class WebMixin(TimezoneMixin):
self._htmlname_unicode = u"<&weirdly'named\"file>>>_<iframe />.txt"
self._htmlname_raw = self._htmlname_unicode.encode('utf-8')
self._htmlname_urlencoded = urllib.quote(self._htmlname_raw, '')
self._htmlname_escaped = escapeToXML(self._htmlname_raw)
self._htmlname_escaped = escapeToXml(self._htmlname_raw)
self._htmlname_escaped_attr = cgi.escape(self._htmlname_raw, quote=True)
self._htmlname_escaped_double = escapeToXML(cgi.escape(self._htmlname_raw, quote=True))
self._htmlname_escaped_double = escapeToXml(cgi.escape(self._htmlname_raw, quote=True))
self.HTMLNAME_CONTENTS, n, self._htmlname_txt_uri = self.makefile(0)
foo.set_uri(self._htmlname_unicode, self._htmlname_txt_uri, self._htmlname_txt_uri)