mirror of
https://codeberg.org/Freedium-cfd/web.git
synced 2026-03-11 09:04:37 +00:00
Performing safe encoding
This commit is contained in:
parent
b0822caf1d
commit
340bfaec72
1 changed files with 2 additions and 2 deletions
|
|
@ -36,7 +36,7 @@ class StringAsignmentMix:
|
|||
|
||||
def encode(self, encoding: str):
|
||||
self.__render_string()
|
||||
return self.string.encode(encoding)
|
||||
return self.string.encode(encoding, "surrogatepass")
|
||||
|
||||
def insert(self, key: int, value):
|
||||
self.string_list.insert(key, value)
|
||||
|
|
@ -363,7 +363,7 @@ class RLStringHelper:
|
|||
self.quote_replaces.append(html_quote)
|
||||
|
||||
if not self.templates and not self.replaces and not self.quote_replaces:
|
||||
logger.debug("No templates, no replaces, no quote_replaces")
|
||||
logger.trace("No templates, no replaces, no quote_replaces")
|
||||
return str(self.string)
|
||||
|
||||
updated_text, string_pos_matrix, utf_16_bang_list = self._render_templates(updated_text, string_pos_matrix, utf_16_bang_list)
|
||||
|
|
|
|||
Loading…
Reference in a new issue