From 851204c619fc00f56b3e784e50eb525bd4a6b5be Mon Sep 17 00:00:00 2001 From: j Date: Thu, 15 Oct 2020 11:39:19 +0200 Subject: [PATCH] allow target="_blank" for href --- ox/html.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ox/html.py b/ox/html.py index bd59ace..73234ea 100644 --- a/ox/html.py +++ b/ox/html.py @@ -290,8 +290,10 @@ def sanitize_html(html, tags=None, global_attributes=[]): { 'name': 'a', 'required': ['href'], + 'optional': ['target'], 'validation': { - 'href': valid_url + 'href': valid_url, + 'target': '^_blank$', } }, {'name': 'br'},