[dev] text2html issue
Michael Rubinsky
mike at theupstairsroom.com
Sat Jun 23 22:59:09 UTC 2007
Quoting Michael Rubinsky <mike at theupstairsroom.com>:
>> Quoting Michael Rubinsky <mike at theupstairsroom.com>:
>>
>>> I'm not really sure if this is an issue with Text_Filter per se, but
>>> I've come across a problem that I can't quite track down. Not
>>> filing on bugs since I'm not 100% sure where the problem lies yet...
>>>
>>> Within Ansel, using TEXT_HTML_MICRO while parsing captions in
>>> various places seems to completley break the page. It seems to
>>> have something to do with where the imp javascript is included. The
>>> issue does not happen when you force a mailto: url.
>>>
>>> To reproduce: set a image caption to contain something resembling a
>>> valid email address, then try to view the gallery page that contains
>>> that image tile... Similar issue when viewing the image view as well.
>>>
>>> Changling parselevel to TEXT_HTML_MICRO_LINKURL fixes the issue in
>>> Ansel, but didn't know if there was some other underlying issue here
>>> that needed to be looked into?
>
>
> Alright, I dove into this some more and at least I've found the
> exact point that breaks this - Text_Filter_emails calls
> mail/compose when it encounters an email-like string. Following
> that through, imp/lib/base.php is eventually included which
> attempts to start compression...which was already started from
> within Ansel's base.php. For some reason, the static variable
> $started in Horde::compressOutput() is not retaining it's value the
> second time it is called (from imp's base.php), and since we are
> already buffering, the if block checking ob_get_level will be true
> - and the buffer will be cleared.
>
> I'm at a loss as to why $started is not acting statically here.
A long shot, but I'm wondering if this is an issue with me running php
as a cgi with lighttpd. Can someone *not* using it as a cgi test this
for me? Than I'll know for sure if this even a horde issue?
Simplest way to test would be something like a new file testme.php:
<code>
@define('ANSEL_BASE', dirname(__FILE__));
require_once ANSEL_BASE . '/lib/base.php';
/** Text_Filter */
require_once 'Horde/Text/Filter.php';
include ANSEL_BASE . '/templates/common-header.inc';
echo 'you should see me also....';
echo Text_Filter::filter('mike at here.com', 'text2html',
array('parselevel' => TEXT_HTML_MICRO));
</code>
If all you get is the output of the Text_Filter call, then my problem
is confirmed...
Thanks!
Thanks,
mike
--
The Horde Project (www.horde.org)
mrubinsk at horde.org
"Time just hates me. That's why it made me an adult." - Josh Joplin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-keys
Size: 2013 bytes
Desc: PGP Public Key
Url : http://lists.horde.org/archives/dev/attachments/20070623/0c17b02e/attachment.bin
More information about the dev
mailing list