Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Provaznik <jprovaznik@gitlab.com>2019-08-16 11:22:57 +0300
committerJan Provaznik <jprovaznik@gitlab.com>2019-08-23 11:36:51 +0300
commita98b89e9bcb56b9adc3a4b0bef3e9844bf93bfd0 (patch)
tree4b7d1487d1bddddd94ae11ede65c14eb63926834 /lib/gitlab/markdown_cache.rb
parent842b4d4ab59f19f7311b7f39948e699a6924fd52 (diff)
Re-escape whole HTML content instead of only match
When we un-escape HTML text to find references in it, we should then re-escape the whole text again, not only found matches. Because we replace matches with milestone/label links (which contain HTML tags we don't want to escape again), we re-escape HTML text with placeholders instead of these links and then replace placeholders in the escaped text.
Diffstat (limited to 'lib/gitlab/markdown_cache.rb')
-rw-r--r--lib/gitlab/markdown_cache.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/markdown_cache.rb b/lib/gitlab/markdown_cache.rb
index 0354c710a3f..03a2f62cbd9 100644
--- a/lib/gitlab/markdown_cache.rb
+++ b/lib/gitlab/markdown_cache.rb
@@ -3,8 +3,8 @@
module Gitlab
module MarkdownCache
# Increment this number every time the renderer changes its output
+ CACHE_COMMONMARK_VERSION = 17
CACHE_COMMONMARK_VERSION_START = 10
- CACHE_COMMONMARK_VERSION = 16
BaseError = Class.new(StandardError)
UnsupportedClassError = Class.new(BaseError)