I have drupal 5.1 installed with the textile module. When I put any content in and use the textile filter all I get is a blank page when i try to view the content. This is with pages and stories.

Has anyone else had this problem?

Comments

dninja’s picture

A bit of playing shows that it is only certain tags which cause the problem, this works:

test
*aa*
**bold**

but this fails:

h1. header
test
*aa*
**bold**

Lists also kill it

dninja’s picture

I've tracked it down to the regexp around line 850 of modules/textile/textilephp/Textile.php. If this regexp is used the blank page is returned, if this is reduced to something simple it seems to work ok. There is another regexp around 953 which also seems to cause the same problem.

{^(h[1-6]|p|bq|bc|fn\d+) ((?:(?: (?:\([A-Za-z0-9_\- \#]+\)) | (?:{ [A-Za-z0-9_\-](?: \( [^)]+ \) | [^\}] )+ }) | (?:\|[^\|]+\|) | (?:\(+?(?![A-Za-z0-9_\-\#])) | (?:\)+) | (?: \[ [a-zA-Z]+? \] ) )*|(?:<>|[<>=]))*) (\.\.?) (?::(\d+|(?: # Must start out right... (?=[a-zA-Z0-9./#]) # Match the leading part (proto://hostname, or just hostname) (?: # ftp://, http://, or https:// leading part (?:ftp|https?|telnet|nntp)://(?:\w+(?::\w+)?@)?[-\w]+(?:\.\w[-\w]*)+ | (?:mailto:)?[-\+\w]+@[-\w]+(?:\.\w[-\w]*)+ | # or, try to find a hostname with our more specific sub-expression (?i: [a-z0-9] (?:[-a-z0-9]*[a-z0-9])? \. )+ # sub domains # Now ending .com, etc. For these, require lowercase (?-i: com\b | edu\b | biz\b | gov\b | in(?:t|fo)\b # .int or .info | mil\b | net\b | org\b | museum\b | aero\b | coop\b | name\b | pro\b | [a-z][a-z]\b # two-letter country codes ) )? # Allow an optional port number (?: : \d+ )? # The rest of the URL is optional, and begins with / . . . (?: /? # The rest are heuristics for what seems to work well [^.!,?;:"'<>()\[\]{}\s\x7F-\xFF]* (?: [.!,?;:]+ [^.!,?;:"'<>()\[\]{}\s\x7F-\xFF]+ #'" )* )? )))?\ (.*)$}sx

sessy’s picture

I can confirm that. A quick "soluton" can be found here:
http://drupal.org/node/143730#comment-243655

dninja’s picture

That doesn't work for me. I still get a blank page.

Checking the regexp in a page with its own error handling shows that there is a bracket missing somewhere in it.

dninja’s picture

A friend tried this on his hosting platform with a version of php 5 and it works fine for him. I'm on version 4.4.7. It may make a difference.

melon’s picture

I found that textile is a true memory eater. You might also get blank page and no error messages, because the display_errors php variable is turned off for the site. If you have access to the php error log, complaints about memory might be found.

sessy’s picture

trevortwining’s picture

Status: Active » Closed (fixed)

Seems resolved now