Replace backslash escape only in old posts after import

No, but apparently I was missing some additional escapes. This is what works now:

raw = post.raw.gsub(/(?<=[^\\])\\\%/, '\\\\\%')

Using '\\\\\%'over "\\\\\%"also makes a difference.

Thanks for initially pointing me to the Rails console, @pfaffman!