From a55a0d99d1a2bd7368fdbb0831f4864e97af6752 Mon Sep 17 00:00:00 2001
From: Angie Byron <webchick@24967.no-reply.drupal.org>
Date: Sun, 2 Aug 2009 08:16:16 +0000
Subject: [PATCH] #412410 by c960657: Make schema descriptions plain text.

---
 includes/database/mysql/schema.inc    |  3 ---
 includes/database/schema.inc          | 14 ++++++--------
 modules/aggregator/aggregator.install |  4 ++--
 modules/block/block.install           |  2 +-
 4 files changed, 9 insertions(+), 14 deletions(-)

diff --git a/includes/database/mysql/schema.inc b/includes/database/mysql/schema.inc
index 48e4c2eb7398..827f274aaf7c 100644
--- a/includes/database/mysql/schema.inc
+++ b/includes/database/mysql/schema.inc
@@ -349,9 +349,6 @@ public function changeField(&$ret, $table, $field, $field_new, $spec, $keys_new
   }
 
   public function prepareComment($comment, $length = NULL) {
-    // Decode HTML-encoded comments.
-    $comment = decode_entities(strip_tags($comment));
-
     // Work around a bug in some versions of PDO, see http://bugs.php.net/bug.php?id=41125
     $comment = str_replace("'", '’', $comment);
 
diff --git a/includes/database/schema.inc b/includes/database/schema.inc
index a6dbcc53d66e..442fedd69120 100644
--- a/includes/database/schema.inc
+++ b/includes/database/schema.inc
@@ -25,8 +25,8 @@
  *
  * The following keys are defined:
  *
- *   - 'description': A string describing this table and its purpose.
- *     References to other tables should be enclosed in
+ *   - 'description': A string in non-markup plain text describing this table
+ *     and its purpose. References to other tables should be enclosed in
  *     curly-brackets. For example, the node_revisions table
  *     description field might contain "Stores per-revision title and
  *     body data for each {node}."
@@ -34,8 +34,8 @@
  *     that describes the table's database columns. The specification
  *     is also an array. The following specification parameters are defined:
  *
- *     - 'description': A string describing this field and its purpose.
- *       References to other tables should be enclosed in
+ *     - 'description': A string in non-markup plain text describing this field
+ *       and its purpose. References to other tables should be enclosed in
  *       curly-brackets. For example, the node table vid field
  *       description might contain "Always holds the largest (most
  *       recent) {node_revision}.vid value for this nid."
@@ -44,8 +44,8 @@
  *       just map to the according database engine specific
  *       datatypes. Use 'serial' for auto incrementing fields. This
  *       will expand to 'int auto_increment' on mysql.
- *     - 'serialize': A boolean indicating whether the field will be stored
-         as a serialized string.
+ *     - 'serialize': A boolean indicating whether the field will be stored as
+ *       a serialized string.
  *     - 'size': The data size: 'tiny', 'small', 'medium', 'normal',
  *       'big'. This is a hint about the largest value the field will
  *       store and determines which of the database engine specific
@@ -530,8 +530,6 @@ public function fieldNames($fields) {
    *   The prepared comment.
    */
   public function prepareComment($comment, $length = NULL) {
-    // Decode HTML-encoded comments.
-    $comment = decode_entities(strip_tags($comment));
     return $this->connection->quote($comment);
   }
 }
diff --git a/modules/aggregator/aggregator.install b/modules/aggregator/aggregator.install
index 9d3733312cb8..e992e70d3fae 100644
--- a/modules/aggregator/aggregator.install
+++ b/modules/aggregator/aggregator.install
@@ -159,13 +159,13 @@ function aggregator_schema() {
         'length' => 255,
         'not null' => TRUE,
         'default' => '',
-        'description' => 'The parent website of the feed; comes from the &lt;link&gt; element in the feed.',
+        'description' => 'The parent website of the feed; comes from the <link> element in the feed.',
       ),
       'description' => array(
         'type' => 'text',
         'not null' => TRUE,
         'size' => 'big',
-        'description' => "The parent website's description; comes from the &lt;description&gt; element in the feed.",
+        'description' => "The parent website's description; comes from the <description> element in the feed.",
       ),
       'image' => array(
         'type' => 'text',
diff --git a/modules/block/block.install b/modules/block/block.install
index b3c207996dcc..5a15da0910d1 100644
--- a/modules/block/block.install
+++ b/modules/block/block.install
@@ -84,7 +84,7 @@ function block_schema() {
         'length' => 64,
         'not null' => TRUE,
         'default' => '',
-        'description' => 'Custom title for the block. (Empty string will use block default title, &lt;none&gt; will remove the title, text will cause block to use specified title.)',
+        'description' => 'Custom title for the block. (Empty string will use block default title, <none> will remove the title, text will cause block to use specified title.)',
       ),
       'cache' => array(
         'type' => 'int',
-- 
GitLab