mirror of
https://github.com/inventree/InvenTree.git
synced 2026-09-01 17:51:23 +00:00
Manual cleaning update
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user