On 23 September 2010 15:03, Phillip <omsdialo...@gmail.com> wrote: > Don't do anything and the escaped characters will appear as you > intend. > > in view code: > <% text = " <a href= "http://www.blahblah.org/ > blah">LetterAttack...</a > > is what i say" -%> > > <textarea><%= text -%></textarea> > > renders like this: > <a href= "http://www.blahblah.org/blah">LetterAttack...</a > > is what i say
Will it not display <a href... on screen rather than generating an html href tag? Colin > > > On Sep 23, 4:32 am, Colin Law <clan...@googlemail.com> wrote: >> On 23 September 2010 09:20, Maz Zalk <li...@ruby-forum.com> wrote: >> >> >> >> >> >> > Colin Law wrote: >> >> On 23 September 2010 04:44, Maz Zalk <li...@ruby-forum.com> wrote: >> >>> This is what is in my page source >> >> >>> <textarea id="text" name="text" rows="6" style="width: 100%">&lt;a >> >>> href=&quot;http://www.blahblah.org/blah">LetterAttack</a&... >> >>> this is what i say</textarea> >> >> >> What is in @text and what did you expect the html to look like? >> >> >> Colin >> >> > Hi >> >> > My question was not clear, I am seeing text in the textarea instead of >> > html >> >> > @text is >> > &lt;ahref=&quot;http://www.blahblah.org/blah">LetterAttack</a&... >> > is what i say >> >> > and what I want to see is >> > <a href="http://www.blahblah.org/blah"> LetterAttack this is what i say >> >> So, for example, you have the string "&lt;" and you want want to >> convert it to "<"? >> I think that could be tricky, it is certainly not what is meant by >> escaping, it is more de-escaping. Can you not start with the text in >> a simpler form before it is escaped? If you have only a limited set >> of substrings that need converting >> then I think you may just have to write code to convert them. >> >> Colin > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-t...@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.