Manual cleaning update

This commit is contained in:
Oliver Walters
2026-07-06 12:51:49 +00:00
parent d6bd41cb05
commit fedcf9e8b1
+7
View File
@@ -10,6 +10,7 @@ import hmac
import json import json
import math import math
import os import os
import re
import uuid import uuid
from collections import OrderedDict from collections import OrderedDict
from datetime import timedelta, timezone from datetime import timedelta, timezone
@@ -3130,6 +3131,12 @@ class Note(
}, },
) )
# nh3 does not recognise legacy IE-only CSS expression() calls as
# unsafe, so they survive style attribute filtering - strip them explicitly
self.content = re.sub(
r'expression\s*\(', '', self.content, flags=re.IGNORECASE
)
def check_save(self): def check_save(self):
"""Check if this note can be saved.""" """Check if this note can be saved."""
from InvenTree.models import InvenTreeNoteMixin from InvenTree.models import InvenTreeNoteMixin