Prevent gfm() to leak changes to the string supplied through the _text_ argument
This commit is contained in:
parent
ce3fb94939
commit
d661b893c5
1 changed files with 3 additions and 0 deletions
|
@ -48,6 +48,9 @@ module Gitlab
|
||||||
def gfm(text, html_options = {})
|
def gfm(text, html_options = {})
|
||||||
return text if text.nil?
|
return text if text.nil?
|
||||||
|
|
||||||
|
# prevents the string supplied through the _text_ argument to be altered
|
||||||
|
text = text.dup
|
||||||
|
|
||||||
@html_options = html_options
|
@html_options = html_options
|
||||||
|
|
||||||
# Extract pre blocks so they are not altered
|
# Extract pre blocks so they are not altered
|
||||||
|
|
Loading…
Reference in a new issue