Commit d661b893 authored by Riyad Preukschas's avatar Riyad Preukschas

Prevent gfm() to leak changes to the string supplied through the _text_ argument

parent ce3fb949
......@@ -48,6 +48,9 @@ module Gitlab
def gfm(text, html_options = {})
return text if text.nil?
# prevents the string supplied through the _text_ argument to be altered
text = text.dup
@html_options = html_options
# Extract pre blocks so they are not altered
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment