mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
metaWeblog API중 최신글 못불러오는 버그 수정
CDATA 타입 추가 및 XML description 부분 CDATA로 처리.
This commit is contained in:
parent
b0b6ef993b
commit
8b2ed49d10
2 changed files with 6 additions and 2 deletions
|
|
@ -487,7 +487,7 @@ if($called_position == 'before_module_proc')
|
|||
$post = new stdClass();
|
||||
$post->categories = array();
|
||||
$post->dateCreated = date("Ymd", $oDocument->getRegdateTime()) . 'T' . date("H:i:s", $oDocument->getRegdateTime());
|
||||
$post->description = htmlspecialchars($oEditorController->transComponent($oDocument->getContent(false, false, true, false)), ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
|
||||
$post->description = sprintf('<![CDATA[%s]]>',$oEditorController->transComponent($oDocument->getContent(false, false, true, false)));
|
||||
$post->link = $post->permaLink = getFullUrl('', 'document_srl', $oDocument->document_srl);
|
||||
$post->postid = $oDocument->document_srl;
|
||||
$post->title = htmlspecialchars($oDocument->get('title'), ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
|
||||
|
|
|
|||
|
|
@ -31,7 +31,11 @@ function getXmlRpcResponse($params)
|
|||
// Encoding
|
||||
function _getEncodedVal($val, $is_sub_set = false)
|
||||
{
|
||||
if(is_int($val))
|
||||
if(preg_match('/^\<\!\[CDATA\[/',$val))
|
||||
{
|
||||
$buff = sprintf("<value>%s</value>", $val);
|
||||
}
|
||||
elseif(is_int($val))
|
||||
{
|
||||
$buff = sprintf("<value><i4>%d</i4></value>", $val);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue