diff --git a/app/classes/web/base_handler.py b/app/classes/web/base_handler.py index 4ab15f06..e772d633 100644 --- a/app/classes/web/base_handler.py +++ b/app/classes/web/base_handler.py @@ -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):