cvs: phd /themes/php chmsource.php
| From: | Rudy Nappée | Date: | Mon, 09 Jun 2008 21:59:52 +0000 |
| Subject: | cvs: phd /themes/php chmsource.php | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-1774@lists.php.net to get a copy of this message | ||
loudi Mon Jun 9 21:59:52 2008 UTC
Modified files:
/phd/themes/php chmsource.php
Log:
* Support of the accented characters for non-english languages in the CHM TOC & index
http://cvs.php.net/viewvc.cgi/phd/themes/php/chmsource.php?r1=1.3&r2=1.4&diff_format=u
Index: phd/themes/php/chmsource.php
diff -u phd/themes/php/chmsource.php:1.3 phd/themes/php/chmsource.php:1.4
--- phd/themes/php/chmsource.php:1.3 Tue Jun 3 11:05:44 2008
+++ phd/themes/php/chmsource.php Mon Jun 9 21:59:52 2008
@@ -1,5 +1,5 @@
<?php
-/* $Id: chmsource.php,v 1.3 2008/06/03 11:05:44 rquadling Exp $ */
+/* $Id: chmsource.php,v 1.4 2008/06/09 21:59:52 loudi Exp $ */
require_once $ROOT . '/themes/php/chunkedhtml.php';
class chmsource extends chunkedhtml {
@@ -217,13 +217,13 @@
$this->currentTocDepth++;
fwrite($this->hhpStream, "{$ref}\n");
fwrite($this->hhcStream, "{$this->offset(1)}<li><object
type=\"text/sitemap\">\n" .
- "{$this->offset(3)}<param name=\"Name\"
value=\"{$name}\">\n" .
+ "{$this->offset(3)}<param name=\"Name\" value=\""
.htmlentities($name, ENT_NOQUOTES, 'UTF-8') . "\">\n" .
"{$this->offset(3)}<param name=\"Local\"
value=\"{$ref}\">\n" .
"{$this->offset(2)}</object>\n");
if ($hasChild) fwrite($this->hhcStream, "{$this->offset(2)}<ul>\n");
fwrite($this->hhkStream, " <li><object
type=\"text/sitemap\">\n" .
" <param name=\"Local\" value=\"{$ref}\">\n" .
- " <param name=\"Name\" value=\"{$name}\">\n" .
+ " <param name=\"Name\" value=\"" . htmlentities($name,
ENT_NOQUOTES, 'UTF-8') . "\">\n" .
" </object>\n </li>\n");
break;
case PhDReader::CLOSE_CHUNK :
@@ -300,17 +300,17 @@
}
public function format_chunk($open, $name, $attrs, $props) {
- $this->grabContent($attrs);
+ $this->collectContent($attrs);
return parent::format_chunk($open, $name, $attrs, $props);
}
public function format_container_chunk($open, $name, $attrs, $props) {
- $this->grabContent($attrs);
+ $this->collectContent($attrs);
return parent::format_container_chunk($open, $name, $attrs, $props);
}
public function format_root_chunk($open, $name, $attrs) {
- $this->grabContent($attrs);
+ $this->collectContent($attrs);
return parent::format_root_chunk($open, $name, $attrs);
}
@@ -324,7 +324,7 @@
- private function grabContent($attrs) {
+ private function collectContent($attrs) {
if (isset($attrs[PhDReader::XMLNS_XML]["id"])) {
$id = $attrs[PhDReader::XMLNS_XML]["id"];
$this->lastContent = array(