Changeset 49328 in spip-zone for _core_/plugins/textwheel/inc/texte.php


Ignore:
Timestamp:
Jul 4, 2011, 7:43:33 PM (10 years ago)
Author:
cedric@…
Message:

http://core.spip.org/issues/2151
reparer la version wheel de traiter_poesie(), et evacuer la version php

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _core_/plugins/textwheel/inc/texte.php

    r48777 r49328  
    463463}
    464464
    465 // http://doc.spip.org/@traiter_poesie
    466 function traiter_poesie($letexte)
    467 {
    468         if (preg_match_all(",<(poesie|poetry)>(.*)<\/(poesie|poetry)>,UimsS",
    469         $letexte, $regs, PREG_SET_ORDER)) {
    470                 $u = "/\n[\s]*\n/S" . $GLOBALS['meta']['pcre_u'];
    471                 foreach ($regs as $reg) {
    472                         $lecode = preg_replace(",\r\n?,S", "\n", $reg[2]);
    473                         $lecode = preg_replace($u, "\n&nbsp;\n",$lecode);
    474                         $lecode = "<blockquote class=\"spip_poesie\">\n<div>"
    475                                 .preg_replace("/\n+/", "</div>\n<div>", trim($lecode))
    476                                 ."</div>\n</blockquote>\n\n";
    477                         $letexte = str_replace($reg[0], $lecode, $letexte);
    478                 }
    479         }
    480         return $letexte;
    481 }
    482465
    483466// Harmonise les retours chariots et mange les paragraphes html
Note: See TracChangeset for help on using the changeset viewer.