diff --git a/lib/xmldb/classes/generators/mysql/mysql.class.php b/lib/xmldb/classes/generators/mysql/mysql.class.php index 30967ab5469..2d0c5546dc9 100644 --- a/lib/xmldb/classes/generators/mysql/mysql.class.php +++ b/lib/xmldb/classes/generators/mysql/mysql.class.php @@ -238,7 +238,7 @@ class XMLDBmysql extends XMLDBGenerator { if ($xmldb_table->getComment()) { $comment .= 'ALTER TABLE ' . $this->getTableName($xmldb_table); - $comment .= " COMMENT='" . substr($xmldb_table->getComment(), 0, 60) . "'"; + $comment .= " COMMENT='" . addslashes(substr($xmldb_table->getComment(), 0, 60)) . "'"; } return array($comment); } diff --git a/lib/xmldb/classes/generators/oci8po/oci8po.class.php b/lib/xmldb/classes/generators/oci8po/oci8po.class.php index 41d5144dc17..38e1e5c4092 100644 --- a/lib/xmldb/classes/generators/oci8po/oci8po.class.php +++ b/lib/xmldb/classes/generators/oci8po/oci8po.class.php @@ -198,7 +198,7 @@ class XMLDBoci8po extends XMLDBgenerator { function getCommentSQL ($xmldb_table) { $comment = "COMMENT ON TABLE " . $this->getTableName($xmldb_table); - $comment.= " IS '" . substr($xmldb_table->getComment(), 0, 250) . "'"; + $comment.= " IS '" . addslashes(substr($xmldb_table->getComment(), 0, 250)) . "'"; return array($comment); } diff --git a/lib/xmldb/classes/generators/postgres7/postgres7.class.php b/lib/xmldb/classes/generators/postgres7/postgres7.class.php index 9dcf4b00e6a..54ab0b242dc 100644 --- a/lib/xmldb/classes/generators/postgres7/postgres7.class.php +++ b/lib/xmldb/classes/generators/postgres7/postgres7.class.php @@ -135,7 +135,7 @@ class XMLDBpostgres7 extends XMLDBgenerator { function getCommentSQL ($xmldb_table) { $comment = "COMMENT ON TABLE " . $this->getTableName($xmldb_table); - $comment.= " IS '" . substr($xmldb_table->getComment(), 0, 250) . "'"; + $comment.= " IS '" . addslashes(substr($xmldb_table->getComment(), 0, 250)) . "'"; return array($comment); }