mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 04:31:10 +08:00
DEV: Rename UriHelper.escape_uri
to .normalized_encode
This is a much better description of its function. It performs idempotent normalization of a URL. If consumers truly need to `encode` a URL (including double-encoding of existing encoded entities), they can use the existing `.encode` method.
This commit is contained in:
@ -147,7 +147,7 @@ after_initialize do
|
||||
post = options[:post]
|
||||
|
||||
replacement = post&.url.present? ?
|
||||
"<a href='#{UrlHelper.escape_uri(post.url)}'>#{I18n.t("poll.poll")}</a>" :
|
||||
"<a href='#{UrlHelper.normalized_encode(post.url)}'>#{I18n.t("poll.poll")}</a>" :
|
||||
I18n.t("poll.poll")
|
||||
|
||||
doc.css("div.poll").each do |poll|
|
||||
|
Reference in New Issue
Block a user