2 ms·
How’s the htmlsafe trick going to work if strings are immmutable?
by hinkley 1y ago
How’s the htmlsafe trick going to work if strings are immmutable?
- byroot 1y agoFirst, only literal strings are concerned. Second, Rails's `String#html_safe` method's return value is a new instance, it doesn't mutate the receiver in place.