mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 20:16:44 +00:00
Sanitize data before displaying in markdown editor (#3205)
* Sanitize data before displaying in markdown editor * Use the sanitize option provided by easymde * Spelling fix
This commit is contained in:
parent
e83995b4f5
commit
9bd62f986f
@ -35,7 +35,7 @@ class CleanMixin():
|
|||||||
return Response(serializer.data)
|
return Response(serializer.data)
|
||||||
|
|
||||||
def clean_data(self, data: dict) -> dict:
|
def clean_data(self, data: dict) -> dict:
|
||||||
"""Clean / snatize data.
|
"""Clean / sanitize data.
|
||||||
|
|
||||||
This uses mozillas bleach under the hood to disable certain html tags by
|
This uses mozillas bleach under the hood to disable certain html tags by
|
||||||
encoding them - this leads to script tags etc. to not work.
|
encoding them - this leads to script tags etc. to not work.
|
||||||
|
@ -274,6 +274,11 @@ function setupNotesField(element, url, options={}) {
|
|||||||
initialValue: initial,
|
initialValue: initial,
|
||||||
toolbar: toolbar_icons,
|
toolbar: toolbar_icons,
|
||||||
shortcuts: [],
|
shortcuts: [],
|
||||||
|
renderingConfig: {
|
||||||
|
markedOptions: {
|
||||||
|
sanitize: true,
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user