Read more

Haml: Fix problem with HTML-escaped single quotes in text fields

Deleted user #6
October 24, 2012Software engineer

Haml 3.1.2 displays single quotes in FormBuilder#text_ field html escaped. You may see something like that:

David's Chapter
Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more Show archive.org snapshot

Looking at the page's HTML, your field's values will be doubly escaped:

<input ... value="David&amp;#x27;s Chapter" />

Updating Haml to 3.1.5 or newer Show archive.org snapshot will fix it.

Posted to makandra dev (2012-10-24 14:42)