Commit d661b893c55577f1b781cf96c211765c4586b945
1 parent
ce3fb949
Exists in
master
and in
4 other branches
Prevent gfm() to leak changes to the string supplied through the _text_ argument
Showing
1 changed file
with
3 additions
and
0 deletions
Show diff stats
lib/gitlab/markdown.rb
... | ... | @@ -48,6 +48,9 @@ module Gitlab |
48 | 48 | def gfm(text, html_options = {}) |
49 | 49 | return text if text.nil? |
50 | 50 | |
51 | + # prevents the string supplied through the _text_ argument to be altered | |
52 | + text = text.dup | |
53 | + | |
51 | 54 | @html_options = html_options |
52 | 55 | |
53 | 56 | # Extract pre blocks so they are not altered | ... | ... |