mobile game developer singapore,singapore web design,web application singapore,ruby on rails developer singapore,mobile apps singapore,singapore web development,website developer singapore,singapore web design services,web design singapore,design agency singapore,website designer singapore,singapore mobile application developer,singapore website design,mobile developer singapore,web development company singapore,app developer singapore,mobile app developer singapore,mobile app development singapore,singapore mobile app developer,website development singapore,website design singapore,graphic designer in singapore,developer in singapore,design firms in singapore,web design services singapore,ios developer singapore,mobile application development singapore,web designer singapore,singapore app developer,app development singapore,mobile application developer singapore,mobile apps development singapore,developers in singapore,web design company singapore,android developer singapore,web development singapore,ios app development singapore

Ruby on Rails 3 and escaped HTML

Rails 3 assumes that everything is NOT html safe (a change of opinion from Rails 2). Now, all strings are html escaped by default:

<%= h some_string %>

is now the same as

<%= some_string %>

To unescape the HTML (i.e you already know that the string is OK to render out), you need to mark it as html_safe or use keyword raw :

<%= some_string.html_safe %>
<%=raw some_string %>

%d bloggers like this:
WordPress Security