Replace safeURL with encodeForURL, safeUserInput with encodeForHTML or encodeForHTMLAttribute