ATTN: Can we include the following in the weekend scheduled update?
"ak" <[email protected]> Sat, 7 Sep 2002 04:59:23 -0400
| Newsgroups | gmane.comp.web.envolution.devel |
|---|---|
| Message-ID | <000001c2564c$e04840d0$330110ac@dell> |
I just realized that there is no easy way to include text with HTML
formatting in the output buffer using pnHTML. It is either not there or
I am an incredibly stupid person :). Anyway, I NEED this functionality
and I am sure others using pnHTML would agree with me. I got a fix.
Works for me. Will not break anything. Here it goes:
Problem is that Text($text) function used in pnHTML uses
pnVarPrepForDisplay() API function. Here is my fix:
Introduce TextHTML($text) function which is identical to Text($text)
function but uses pnVarPrepHTMLDisplay() API function instead. Easy,
clean, and works now. Below is the function I added to my pnHTML file.
/**
* Add free-form text with HTML formatting to the object's buffer
*
* @access public
* @param string $text The text string to add
* @return string An HTML string if <code>ReturnHTML()</code> has
been called,
* otherwise null
*/
function TextHTML($text)
{
if ($this->GetInputMode() == _PNH_PARSEINPUT)
{
$text = pnVarPrepHTMLDisplay($text);
}
if ($this->GetOutputMode() == _PNH_RETURNOUTPUT)
{
return $text;
} else {
$this->output .= $text;
}
}
Can we please include this one? It would make my life so much easier!
Respectfully,
ak