转义增加&的转义
This commit is contained in:
parent
3ceb1e92bb
commit
94ed3501f8
|
@ -2345,6 +2345,6 @@ module ApplicationHelper
|
||||||
|
|
||||||
#将文本内的/n转换为<br>
|
#将文本内的/n转换为<br>
|
||||||
def text_format text
|
def text_format text
|
||||||
text.gsub("<","<").gsub(">",">").gsub("\n","<br/>").html_safe
|
text.gsub("&","&").gsub("<","<").gsub(">",">").gsub("\n","<br/>").html_safe
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue