I just did not want to use EscapeTool in speed for url encoding. Therefore, here I got the solution -
you can use $ httpUtil.decodeURL ($ siteURL) / $ httpUtil.encodeURL ($ siteURL) to encode the URL in speed
Alternatively, you can use $htmlUtil.escapeAttribute() to escape text / html Content in Velocity.
$htmlUtil.escapeAttribute($refSiteName)
source share