Dotclear

Changeset 3424:7b8434cae028 for inc


Ignore:
Timestamp:
11/26/16 12:27:37 (9 years ago)
Author:
Jean-Christian Denis
Branch:
default
Message:

Fix HTML validation on RDF EntryPingData?, closes #2073

Location:
inc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • inc/core/class.dc.rs.extensions.php

    r3167 r3424  
    379379     @return   <b>string</b> 
    380380     */ 
    381      public static function getTrackbackData($rs) 
     381     public static function getTrackbackData($rs,$format='html') 
    382382     { 
    383383          return 
    384           "<![CDATA[>\n". 
    385           "<!--[\n". 
     384          ($format == 'xml' ? "<![CDATA[>\n" : ''). 
     385          "<!--\n". 
    386386          '<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"'."\n". 
    387387          '  xmlns:dc="http://purl.org/dc/elements/1.1/"'."\n". 
     
    393393          '  trackback:ping="'.$rs->getTrackbackLink().'" />'."\n". 
    394394          "</rdf:RDF>\n". 
    395           "<!]]><!---->\n"; 
     395          ($format == 'xml' ? "<!]]><!--" : ''). 
     396          "-->\n"; 
    396397     } 
    397398 
  • inc/public/class.dc.template.php

    r3366 r3424  
    19211921     public function EntryPingData($attr) 
    19221922     { 
    1923           return "<?php if (\$_ctx->posts->trackbacksActive()) { echo \$_ctx->posts->getTrackbackData(); } ?>\n"; 
     1923          $format = !empty($attr['format']) && $attr['format'] == 'xml' ? 'xml' : 'html'; 
     1924          return "<?php if (\$_ctx->posts->trackbacksActive()) { echo \$_ctx->posts->getTrackbackData('".$format."'); } ?>\n"; 
    19241925     } 
    19251926 
Note: See TracChangeset for help on using the changeset viewer.

Sites map