You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is useful if you want to link to a tag summary page where tags potentially have spaces in them. So if tag is "interesting stuff", <a href="/tags/{{tag|cgi_escape}"> would link to /tags/interesting+stuff. I guess it can be used to link to a search engine as well.
(Oh, and standard Jekyll doesn't support tags, but it should, so replace tag with category or topic in the description above.)
The text was updated successfully, but these errors were encountered:
I think xml_escape should be deprecated in favor of using cgi_escape, and cgi_escape should be renamed to simply escape. I don't see any reason why we shouldn't use this for all escaping needs. Any thoughts?
I think we need both. xml_escape for escaping strings that are to be inserted into HTML or XML and that may contain <, > or &. cgi_escape for strings that goes into URLs and may contain space, #, % and other special characters.
I created a filter that escapes characters so they can safely be used in URLs.
I.e. "hey! you!" will be escaped as "hey%21+you%21".
See this branch: http://github.com/vilcans/jekyll/tree/cgi_escape
This is useful if you want to link to a tag summary page where tags potentially have spaces in them. So if tag is "interesting stuff", <a href="/tags/{{tag|cgi_escape}"> would link to /tags/interesting+stuff. I guess it can be used to link to a search engine as well.
(Oh, and standard Jekyll doesn't support tags, but it should, so replace tag with category or topic in the description above.)
The text was updated successfully, but these errors were encountered: