This should just be

```ruby
@img['alt'] = @img['title'].gsub(/"/, '&#34;')
```

I think.