Skip to content

Commit

Permalink
Correcting quote handling in Firebug console output.
Browse files Browse the repository at this point in the history
Bug: 18141
Submitted by: Eric Caron
  • Loading branch information
jparise committed Dec 23, 2010
1 parent baabe79 commit c430ec4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
13 changes: 3 additions & 10 deletions Log/firebug.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,15 +179,9 @@ function log($message, $priority = null)
/* Extract the string representation of the message. */
$message = $this->_extractMessage($message);
$method = $this->_methods[$priority];

/* normalize line breaks */
$message = str_replace("\r\n", "\n", $message);

/* escape line breaks */
$message = str_replace("\n", "\\n\\\n", $message);

/* escape quotes */
$message = str_replace('"', '\\"', $message);

/* normalize line breaks and escape quotes*/
$message = preg_replace("/\r?\n/", "\\n", addslashes($message));

/* Build the string containing the complete log line. */
$line = $this->_format($this->_lineFormat,
Expand All @@ -210,5 +204,4 @@ function log($message, $priority = null)

return true;
}

}
1 change: 1 addition & 0 deletions package.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
$version = '1.12.5';
$notes = <<<EOT
- Corrected the "levels" unit test on 32-bit systems. (Bug 18099)
- Corrected quote handling in Firebug console output. (Bug 18141)
EOT;

$package = new PEAR_PackageFileManager2();
Expand Down
8 changes: 5 additions & 3 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
<email>jan@horde.org</email>
<active>yes</active>
</lead>
<date>2010-12-12</date>
<time>19:18:50</time>
<date>2010-12-22</date>
<time>20:33:34</time>
<version>
<release>1.12.5</release>
<api>1.0.0</api>
Expand All @@ -38,6 +38,7 @@
<license uri="http://www.opensource.org/licenses/mit-license.php">MIT License</license>
<notes>
- Corrected the &quot;levels&quot; unit test on 32-bit systems. (Bug 18099)
- Corrected quote handling in Firebug console output. (Bug 18141)
</notes>
<contents>
<dir baseinstalldir="/" name="/">
Expand Down Expand Up @@ -148,10 +149,11 @@
<release>stable</release>
<api>stable</api>
</stability>
<date>2010-12-12</date>
<date>2010-12-22</date>
<license uri="http://www.opensource.org/licenses/mit-license.php">MIT License</license>
<notes>
- Corrected the &quot;levels&quot; unit test on 32-bit systems. (Bug 18099)
- Corrected quote handling in Firebug console output. (Bug 18141)
</notes>
</release>
<release>
Expand Down

0 comments on commit c430ec4

Please sign in to comment.