diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-02-08 19:46:01 -0600 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-02-09 07:50:41 -0600 |
commit | 2e040c3ff7046a90ae9687d5a5c1259687be5ff9 (patch) | |
tree | e4f633b407efb3c275dcc004d740a5ef27814c7a /app | |
parent | 110cd58999abb45f52273f5870fe16a3ad026746 (diff) | |
download | gitlab-ce-2e040c3ff7046a90ae9687d5a5c1259687be5ff9.tar.gz |
Correctly transform an anchor link to GFM when copying it
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/copy_as_gfm.js.es6 | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/assets/javascripts/copy_as_gfm.js.es6 b/app/assets/javascripts/copy_as_gfm.js.es6 index 2bfe57b4100..4bd537a6f28 100644 --- a/app/assets/javascripts/copy_as_gfm.js.es6 +++ b/app/assets/javascripts/copy_as_gfm.js.es6 @@ -91,6 +91,9 @@ require('./lib/utils/common_utils'); }, }, SanitizationFilter: { + 'a[name]:not([href]):empty'(el, text) { + return el.outerHTML; + }, 'dl'(el, text) { let lines = text.trim().split('\n'); // Add two spaces to the front of subsequent list items lines, |