URL encode username in user link

This commit is contained in:
Naoki Takezoe
2018-05-28 12:15:26 +09:00
parent e2da18a763
commit 172701105a

View File

@@ -255,7 +255,7 @@ object helpers extends AvatarImageProvider with LinkConverter with RequestCache
/**
* Generates the url to the account page.
*/
def url(userName: String)(implicit context: Context): String = s"${context.path}/${userName}"
def url(userName: String)(implicit context: Context): String = s"${context.path}/${StringUtil.urlEncode(userName)}"
/**
* Returns the url to the root of assets.