Re: Re: [Text_Wiki] configuring of renderer - htmlspecialchars and charset

From: Date: Fri, 24 Mar 2006 21:18:08 +0000
Subject: Re: Re: [Text_Wiki] configuring of renderer - htmlspecialchars and charset
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-23449@lists.php.net to get a copy of this message
ha sorry ! back from hell loosed connection back to modem just did not make enough training for connections and secured backups tsk tsk Yes, you need to say "Xhtml" with a big X by $wiki->setFormatConf('Xhtml', ... We don't try to save time by coders... -- toggg bertrand Gugger wrote: > Bonjour, > Sorry taking it out from users@textwiki.tigris.org. > > Jakub Zvěřina wrote: > >> Hi, >> >> I need output of Text_Wiki send via email. For this case I need to >> encode specialchars by htmlspecialchars and not by htmlentities and >> also set charset to UTF-8 which I use everywhere in scripts. >> >> class MyClass { >> public function __construct() { $this->wiki = new >> Text_Wiki(); >> $this->wiki->setFormatConf('xhtml', 'translate', >> HTML_SPECIALCHARS); > > > $this->wiki->setFormatConf('xhtml', array('translate' => > HTML_SPECIALCHARS, 'charset' =>"UTF-8"); > >> $this->wiki->setFormatConf('xhtml', 'charset', "UTF-8"); >> } >> } > > > But you could be better use 'Xhtml' > is it not the > >> >> And this doesn't work. I tried many combinations such as: >> $this->wiki->set (Format | Render | Parse) Conf (...); >> as arguments: >> 'xhtml', 'translatehtml', array('translate'=>HTML_SPECIALCHARS, >> 'charset'=>'UTF-8') >> 'xhtml', 'translate', HTML_SPECIALCHARS >> 'xhtml', 'charset', 'UTF-8' >> >> and nothing didn't work at all, I have the only way to change >> behavior of Text_Wiki so far: >> in /usr/share/pear/Text/Wiki/Render/Xhtml.php set configuration >> variables to what I need: >> $type = HTML_SPECIALCHARS;//$this->getConf('translate', >> HTML_ENTITIES); >> $charset = "UTF-8";//$this->getConf('charset', 'ISO-8859-1'); >> and it works. >> >> How can I configure these values in my class? Thank you. >> > What version of Text_Wiki are you running ? > var $conf = array( > 'translate' => HTML_ENTITIES, > 'quotes' => ENT_COMPAT, > 'charset' => 'ISO-8859-1' > ); >

« previous php.pear.general (#23449) next »