Fix HTML escaping in StringRangeMarker
Rails now handles html_safe when using string ranges to replace text. We need to mark the replacement text as HTML-safe so that it doesn't get escaped when it gets inserted into the HTML-safe string. Example: string = "<p>Hello</p>".html_safe string[3..4] = "<b>He</b>" "<p><b>He</b>llo</p>" Correct way: string = "<p>Hello</p>".html_safe string[3..4] = "<b>He</b>".html_safe "<p><b>He</b>llo</p>"
Showing
Please register or sign in to comment