fix linking bug when an url is surrounded by quotes

This commit is contained in:
Thibault Duplessis 2013-02-16 22:34:04 +01:00
parent 2031fa40fd
commit 490ade4737

View file

@ -35,7 +35,10 @@ trait StringHelper {
nl2br(addLinks(escape(text)))
}
def escape(text: String) = escapeXml(text)
// the replace quot; -> " is required
// to avoid issues caused by addLinks
// when an url is surrounded by quotes
def escape(text: String) = escapeXml(text).replace(""", "\"")
def nl2br(text: String) = text.replace("\r\n", "<br />").replace("\n", "<br />")