code and quote block dont work

This forum is now closed as part of retiring phpBB2.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

This forum is now closed due to phpBB2.0 being retired.
Post Reply
User avatar
Wicher
Registered User
Posts: 1806
Joined: Wed May 07, 2003 10:33 pm
Location: Netherlands or Holland, your choice..
Contact:

code and quote block dont work

Post by Wicher »

Hello,

since a while now i am strugling to find a bug on my board.
Might well be a bug from one of my own mods, but i cant figure it out.

The problem:

when i put code in a code bbcode tag, most of that code between the tags disapears.

for example:

Code: Select all

<a href="javascript:void(0);" onclick="scroll_minibanners.start(); scroll_minibanners.scrollAmount=2;"><img src="images/links/icon_up.gif" border="0" alt="Go"></a>&nbsp;
becomes:

Code: Select all

<a><img></a>&nbsp;
Does anyone know where i have to look to get this bug fixed?
User avatar
Wicher
Registered User
Posts: 1806
Joined: Wed May 07, 2003 10:33 pm
Location: Netherlands or Holland, your choice..
Contact:

Re: code and quote block dont work

Post by Wicher »

when i , in functions_post.php remove this part from the function prepare_post, the code blocks work oke:

Code: Select all

		foreach ($message_split as $part)
		{
			$tag = array(array_shift($matches[0]), array_shift($matches[1]), array_shift($matches[2]));
			$message .= preg_replace($html_entities_match, $html_entities_replace, $part) . clean_html($tag);
		}
This piece of code is the same as in a fresh phpbb latest version
Why does this bug me?
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53379
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: code and quote block dont work

Post by Brf »

Do you have HTML enabled or something? I have seen weird things happen then.
User avatar
Wicher
Registered User
Posts: 1806
Joined: Wed May 07, 2003 10:33 pm
Location: Netherlands or Holland, your choice..
Contact:

Re: code and quote block dont work

Post by Wicher »

I did have "allow html" enabled, after disabling it the code blocks got working ok.
A bit strange if you ask me, but well it works ok again.

thanks brf
User avatar
Dogs and things
Registered User
Posts: 2114
Joined: Fri Sep 01, 2006 9:04 am
Location: Spain
Contact:

Re: code and quote block dont work

Post by Dogs and things »

Hi Wicher,

Just out of curiosity I tried to post the same piece of code on my liveboard, using code tags.
A 500 error was produced, even after disabling html.

But I guess this error comes up because I have mod_security running on my server.

If I remove href from the code only this is seen in the post

Code: Select all

<a><img src="images/links/icon_up.gif" border="0" alt="Go"></a>&nbsp; 
instead of

Code: Select all

<a ="javascript:void(0);" onclick="scroll_minibanners.start(); scroll_minibanners.scrollAmount=2;"><img src="images/links/icon_up.gif" border="0" alt="Go"></a>&nbsp;
No idea if this is of any help but anyways, it gives me a chance to send you my greetings. :P
For phpBB2 support visit phpBB2refugees.
User avatar
Wicher
Registered User
Posts: 1806
Joined: Wed May 07, 2003 10:33 pm
Location: Netherlands or Holland, your choice..
Contact:

Re: code and quote block dont work

Post by Wicher »

The bug was gone after i followed the suggestion to disable html in the acp configuration.
But thanks anyway and thanks for the greetings.

I hope all is well in spain?
Post Reply

Return to “[2.0.x] MOD Writers Discussion”