Displaying 1 result from an estimated 1 matches for "string_escape_uri".
2007 Feb 20
4
Best way to implement syntax sugar?
...it.
One thing I decided I immediately wanted to do, was shorten the
number of keystrokes neccessary to URI, HTML, or Jscript encode something.
The project I''ve come into already has helpers defined for this.
Right now, what I''ve done is:
alias h! string_esacpe_html
alias u! string_escape_uri
Then later on in my views, I can do stuff like
<%=h!email_address%>
Or
<a href="<%=h!u!link.uri%>"><%=h!link.name%></a>
It works great. However, I understand that "!" and "?" have special
meanings in ruby. I tried other stuff (li...