par
rimie » 20 avr. 2012, 05:05
je l'ai laisse comme c'est deja fait en PHP, j'ai filtre les br, n et r par des remplacements:
foreach($this->tags as $k=>$v)
{
$this->text = preg_replace('/'.$k.'/', $v , $this->text);
$this->text = preg_replace('/\n/', '', $this->text);
$this->text = preg_replace('/\r/', '', $this->text);
$this->text = preg_replace('/<ul><br \/>/', '<ul>', $this->text);
$this->text = preg_replace('/<br \/><\/ul>/', '</ul>', $this->text);
$this->text = preg_replace('/<\/li><br \/>/', '</li>', $this->text);
}
je pense que c'est la meilleur chose a faire, merci a vous

je l'ai laisse comme c'est deja fait en PHP, j'ai filtre les br, n et r par des remplacements:
[php]
foreach($this->tags as $k=>$v)
{
$this->text = preg_replace('/'.$k.'/', $v , $this->text);
$this->text = preg_replace('/\n/', '', $this->text);
$this->text = preg_replace('/\r/', '', $this->text);
$this->text = preg_replace('/<ul><br \/>/', '<ul>', $this->text);
$this->text = preg_replace('/<br \/><\/ul>/', '</ul>', $this->text);
$this->text = preg_replace('/<\/li><br \/>/', '</li>', $this->text);
}
[/php]
je pense que c'est la meilleur chose a faire, merci a vous :)