PG::Connection.escape is not handling appostrophes correctly

Issue #244 resolved
zwarburg
created an issue

Been trying to debug an issue with my rails app where apostrophes were being duplicated in the database.

[17] pry(main)> ComponentValue.new(value: "a'b'c")
=> #<ComponentValue:0x007f95ca6bbd88 @value="a''b''c">

Traced the issue back to this gem and found that the escape method is not working properly.

[1] pry(main)> PG::Connection.escape("a'b'c")
=> "a''b''c"

Comments (1)

  1. Log in to comment