Fix & issues

This commit is contained in:
Andrew 2022-09-07 15:56:18 -04:00
parent df7d10886e
commit 7437944988

View File

@ -104,7 +104,10 @@ class BaseHandler(tornado.web.RequestHandler):
strip: bool = True,
) -> t.Optional[str]:
arg = self._get_argument(name, default, self.request.arguments, strip)
return self.autobleach(name, arg).replace("&", "&")
bleached = self.autobleach(name, arg)
if "&" in str(bleached):
bleached = bleached.replace("&", "&")
return bleached
def get_arguments(self, name: str, strip: bool = True) -> t.List[str]:
if not isinstance(strip, bool):