mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-04-28 10:34:53 +00:00
Filter out absolute links from outside of Wagtail
This commit is contained in:
parent
8742b249f3
commit
a54d5f0498
1 changed files with 2 additions and 2 deletions
|
|
@ -436,9 +436,9 @@ def register_core_features(features):
|
|||
# We want to enforce constraints on which links can be pasted into rich text.
|
||||
# Keep only the attributes Wagtail needs.
|
||||
'attributes': ['url', 'id', 'parentId'],
|
||||
# Keep only links which are not anchor references.
|
||||
# Keep only links which are not anchors, or absolute links from outside of Wagtail.
|
||||
'whitelist': {
|
||||
'href': '^(?!#)',
|
||||
'href': '^(?![#/])',
|
||||
}
|
||||
})
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue