aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2012-10-15 13:19:03 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2012-10-15 13:20:32 +0200
commit0d8f21868c0e23963b74181a73af6bea79424afd (patch)
tree76981552ac2d1bffd8b5cf6c93d6ea00ec122c27 /sonar-server
parent705de814eb18ff40ba13a59b1800fcb554802046 (diff)
downloadsonarqube-0d8f21868c0e23963b74181a73af6bea79424afd.tar.gz
sonarqube-0d8f21868c0e23963b74181a73af6bea79424afd.zip
SONAR-3876 Backslash characters are duplicated on PostgreSQL 9.1
Diffstat (limited to 'sonar-server')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/gems/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/postgresql/adapter.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/gems/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/postgresql/adapter.rb b/sonar-server/src/main/webapp/WEB-INF/gems/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/postgresql/adapter.rb
index 28a42647bc5..2f442f829cc 100644
--- a/sonar-server/src/main/webapp/WEB-INF/gems/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/postgresql/adapter.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/gems/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/postgresql/adapter.rb
@@ -465,6 +465,15 @@ module ::ArJdbc
end
end
+ #sonar
+ # standard_conforming_strings is forced to true in JDBC connection pool (see org.sonar.core.persistence.dialect.PostgreSql)
+ # so double backslashing must be removed
+ def quote_string(s)
+ s.gsub(/'/, "''") # ' (for ruby-mode)
+ end
+ #/sonar
+
+
def escape_bytea(s)
if s
result = ''