Changeset 1743
- Timestamp:
- 09/10/2008 07:44:37 PM (2 months ago)
- Files:
-
- trunk/xmlrpc.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/xmlrpc.php
r1736 r1743 110 110 $utf8 = 'application/xhtml+xml' == strtolower(trim($s->getResponseHeader("Content-Type"))); 111 111 112 $this->title = empty($title[1]) ? $this->sourceURI : html_entity_decode($utf8 ? utf8_decode($title[1]) : $title[1]); 112 // since text in database is utf8 encoded, we need to *en*code the title to utf8 if it isn't already, not *de*code it 113 $this->title = empty($title[1]) ? $this->sourceURI : html_entity_decode($utf8 ? $title[1] : utf8_encode($title[1])); 113 114 } 114 115 … … 189 190 190 191 function Jlog_SendPingback($html, $pagelinkedfrom, $useragent) { 191 $this->pagelinkedfrom = $pagelinkedfrom; 192 // neet to prevent & in url 193 $this->pagelinkedfrom = htmlspecialchars_decode($pagelinkedfrom); 192 194 $this->useragent = $useragent; 193 195 … … 198 200 for($i = 0; $count > $i; $i++) { 199 201 if(substr($pageslinkedto[$i], 0, 4) !== "http") unset($pageslinkedto[$i]); 200 else $pageslinkedto[$i] = str_replace(array('"','<', '>', '&'), array('"', '<', '>', '&'), $pageslinkedto[$i]); 202 // htmlspecialchars_decode is easier than str_replace 203 else $pageslinkedto[$i] = htmlspecialchars_decode($pageslinkedto[$i]); 201 204 } 202 205 $this->pageslinkedto = $pageslinkedto;
