HTML code shows up when using Wiki markup plugin
-
alemartini
- Regular
- Posts: 16
- Joined: Sat Oct 11, 2008 10:43 pm
HTML code shows up when using Wiki markup plugin
I'm trying to set up a new Serendipity-based blog, and so far everything is working smoothly, except for one thing.
The problem is that if I install the Wiki markup plugin, then all entries start showing HTML code instead of the corresponding rendered result. (All of the entries have been typed in plain text, without ever using a WYSIWYG editor).
Having searched the forums for similar problems, i can see that the Wiki plugin often leads to this kind of behaviour. However, every solution that i've found involves disabling or uninstalling the plugin. And the problem is that I do want to use the plugin.
I've tried moving the plugin to the bottom of my installed plugins, to the top, to the middle, etc, but the problem always showed up. I've also tried switching on and off some of the plugin options (such as "Entities" or "HTML"), but the problem remains.
I'm running Serendipity 1.3.1, and these are the markup plugins that I've installed (in that order):
- Serendipity
- Emoticate
- Textile
- BBCode
- Wiki (currently disabled due to the mentioned problem)
Is there anything that can be done in order to use wiki markup, without having to uninstall any of the other markup plugins?
Any help will be really appreciated!
Thanks in advance,
Alex
P.S: BTW, I am not using the "Options for trustworthy editing on multi-user blogs" plugin.
The problem is that if I install the Wiki markup plugin, then all entries start showing HTML code instead of the corresponding rendered result. (All of the entries have been typed in plain text, without ever using a WYSIWYG editor).
Having searched the forums for similar problems, i can see that the Wiki plugin often leads to this kind of behaviour. However, every solution that i've found involves disabling or uninstalling the plugin. And the problem is that I do want to use the plugin.
I've tried moving the plugin to the bottom of my installed plugins, to the top, to the middle, etc, but the problem always showed up. I've also tried switching on and off some of the plugin options (such as "Entities" or "HTML"), but the problem remains.
I'm running Serendipity 1.3.1, and these are the markup plugins that I've installed (in that order):
- Serendipity
- Emoticate
- Textile
- BBCode
- Wiki (currently disabled due to the mentioned problem)
Is there anything that can be done in order to use wiki markup, without having to uninstall any of the other markup plugins?
Any help will be really appreciated!
Thanks in advance,
Alex
P.S: BTW, I am not using the "Options for trustworthy editing on multi-user blogs" plugin.
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: HTML code shows up when using Wiki markup plugin
Hi!
when you insert images to t he blog through the s9y media management, s9y does that with pure HTML. Thus, the Wiki plugin always transforms that.
The only solution would be to write a plugin or modify the core of s9y that would not issue HTML but Wiki code when that plugin is used.
Then, what also might work is if you configure the wiki plugin to allow HTML syntax. I believe there's a config option in the config section of that plugin...
Regards,
Garvin
when you insert images to t he blog through the s9y media management, s9y does that with pure HTML. Thus, the Wiki plugin always transforms that.
The only solution would be to write a plugin or modify the core of s9y that would not issue HTML but Wiki code when that plugin is used.
Then, what also might work is if you configure the wiki plugin to allow HTML syntax. I believe there's a config option in the config section of that plugin...
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
alemartini
- Regular
- Posts: 16
- Joined: Sat Oct 11, 2008 10:43 pm
Hi Garvin! Thanks for your quick reply.
So far, the problem seems to happen not only with images inserted through the media library, but also with URLs that I've enclosed between <a href ... > and </a> tags (is this the right way to do it?), and even with Textile markup, which I guess is transformed into HTML and ultimately trashed by the Wiki plugin.
In the Wiki plugin configuration, these seem to be the relevant options:
HTML: Allows you to use real HTML between <html> and </html>. Beware JS is possible, too! If you use this, switch off markup for comments! Default is off. Not recommended to switch on
Entities : Escapes HTML entities. Default is on.
I've tried turning those options on and off, and even the four possible combinations between them, but the problem still happens.
Maybe I'm wrong, but about three years ago, I had setup a s9y blog on an intranet at work, and I remember using the wiki markup a lot (and even images and links), but never saw this behaviour. Anyway, that was a long time ago, and like I've said, maybe I'm wrong or maybe there was something very different on the setup I had back then.
Anyway, thanks again for your time and your help.
Best regards,
Alex
So far, the problem seems to happen not only with images inserted through the media library, but also with URLs that I've enclosed between <a href ... > and </a> tags (is this the right way to do it?), and even with Textile markup, which I guess is transformed into HTML and ultimately trashed by the Wiki plugin.
In the Wiki plugin configuration, these seem to be the relevant options:
HTML: Allows you to use real HTML between <html> and </html>. Beware JS is possible, too! If you use this, switch off markup for comments! Default is off. Not recommended to switch on
Entities : Escapes HTML entities. Default is on.
I've tried turning those options on and off, and even the four possible combinations between them, but the problem still happens.
Maybe I'm wrong, but about three years ago, I had setup a s9y blog on an intranet at work, and I remember using the wiki markup a lot (and even images and links), but never saw this behaviour. Anyway, that was a long time ago, and like I've said, maybe I'm wrong or maybe there was something very different on the setup I had back then.
Anyway, thanks again for your time and your help.
Best regards,
Alex
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
For the wiki options, HTML should be set to "on" and Entities set to "Off".
If you use the entrypropreties plugin you might need to click the link "Cache article" (or something like that) in the entries admin section, because output of markup plugins could be cached and thus not making any difference to you.
HTH,
Garvin
For the wiki options, HTML should be set to "on" and Entities set to "Off".
If you use the entrypropreties plugin you might need to click the link "Cache article" (or something like that) in the entries admin section, because output of markup plugins could be cached and thus not making any difference to you.
HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
alemartini
- Regular
- Posts: 16
- Joined: Sat Oct 11, 2008 10:43 pm
Today I tried setting HTML to on and Entities to off, but still the same problem. I've also noticed that even single paragraphs with no markup at all get enclosed between <p> and </p> tags that show up in the blog.
After that, I tried disabling every markup plugin except for Wiki_text. Still the same: I can see on my blog the HTML tags for images and links (however, the paragraph tags dissappear from the final output as soon as I disable the Textile plugin).
I cannot quite understand why this happens, even when the Wiki_text is the only active markup plugin.
Looking at the HTML source of my blog, it is obvious that the problem is that every "<" and ">" gets transformed into < and >. Is this supposed to happen even when telling the Wiki plugin not to escape HTML entities?
Finally I went to bundled-libs/Text/Wiki/Rule/entities.php, which calls htmlspecialchars, and tried commeting out the parse() function so that it does nothing even if it's called. But still no luck.
BTW, I am not using the Extended properties plugin. The entries on the blog are not being cached.
After that, I tried disabling every markup plugin except for Wiki_text. Still the same: I can see on my blog the HTML tags for images and links (however, the paragraph tags dissappear from the final output as soon as I disable the Textile plugin).
I cannot quite understand why this happens, even when the Wiki_text is the only active markup plugin.
Looking at the HTML source of my blog, it is obvious that the problem is that every "<" and ">" gets transformed into < and >. Is this supposed to happen even when telling the Wiki plugin not to escape HTML entities?
Finally I went to bundled-libs/Text/Wiki/Rule/entities.php, which calls htmlspecialchars, and tried commeting out the parse() function so that it does nothing even if it's called. But still no luck.
BTW, I am not using the Extended properties plugin. The entries on the blog are not being cached.
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Sadly I never used the Wiki markup plugin, it wasn't really done for me. Usually it's done by people who completely write their blog entries with pure Wiki and not mix it with HTML (because that goes against the principle of Wiki markup).
Maybe it's a bug in the plugin or the PEAR module that HTML entities still get converted?
Sadly the Wiki pear module is huge, so I cannot spend my time debugging that module, I'm sorry....
Regards,
Garvin
Sadly I never used the Wiki markup plugin, it wasn't really done for me. Usually it's done by people who completely write their blog entries with pure Wiki and not mix it with HTML (because that goes against the principle of Wiki markup).
Maybe it's a bug in the plugin or the PEAR module that HTML entities still get converted?
Sadly the Wiki pear module is huge, so I cannot spend my time debugging that module, I'm sorry....
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
alemartini
- Regular
- Posts: 16
- Joined: Sat Oct 11, 2008 10:43 pm
Garvin, thank you once again for your reply.
Since I'd really like to help to debug and solve this issue, I took the time to make a fresh install of Serendipity to see what happenned.
I choosed the Simple setup, and these were the plugins installed by default:
- Serendipity
- Emoticate
- NL2BR
- Browser compatibility
- Spam protector
Then I added the Wiki plugin, and set its options as before (HTML to on, Entities to off).
Now I can confirm that the plugin is not working as expected (i.e., the Entities directive is not being honoured). And the HTML option seems to be useless too (if you enclose a post between <html> and </html>, those tags show up in the blog instead of being parsed).
There's also a Raw option for the plugin which says that text between `` and `` will not be touched by other rules. That doesn't seem to work either, and even wiki markup rules between `` symbols get applied when they should not.
I understand that you cannot spend time debugging this. I just wanted to post these findings so that other people don't have to go through the same problems.
So here are some preliminary conclusions:
Greetings,
Alex
Since I'd really like to help to debug and solve this issue, I took the time to make a fresh install of Serendipity to see what happenned.
I choosed the Simple setup, and these were the plugins installed by default:
- Serendipity
- Emoticate
- NL2BR
- Browser compatibility
- Spam protector
Then I added the Wiki plugin, and set its options as before (HTML to on, Entities to off).
Now I can confirm that the plugin is not working as expected (i.e., the Entities directive is not being honoured). And the HTML option seems to be useless too (if you enclose a post between <html> and </html>, those tags show up in the blog instead of being parsed).
There's also a Raw option for the plugin which says that text between `` and `` will not be touched by other rules. That doesn't seem to work either, and even wiki markup rules between `` symbols get applied when they should not.
I understand that you cannot spend time debugging this. I just wanted to post these findings so that other people don't have to go through the same problems.
So here are some preliminary conclusions:
- Like you've said, if you're planning on using wiki markup, you should stick to that and don't even think about using the media library, inserting links with <a href...> or putting any kind of HTML tag in your posts.
- The Html option doesn't work
- The Entities option doesn't work
- If you remove every event plugin, leaving just the wiki plugin, you'll find that the problem is still there (from this we could conclude that the problem lies within the plugin itself -or in some of its dependencies-, and not in other plugins or in the interactions between them)
- It's also fair to say that the wiki markup rules work

Greetings,
Alex
-
alemartini
- Regular
- Posts: 16
- Joined: Sat Oct 11, 2008 10:43 pm
Well, I think I should share a small workaround that I've just found. Maybe others find it useful for their own blogs.
If you wish to use the Wiki plugin and still be able to put some HTML tags in your posts, here's what you can do:
Just enclose the HTML tags between `` and ``. For example:
This is a link to ``<a href="http://www.google.com">Google</a>``
I thought that the Raw option of the wiki plugin (i.e., the `` tags) was not working. But in fact, it works. You just have to make sure that the opening and closing `` appear on the same logical line.
This isn't very intuitive. I'd have expected that, like a comment block on most programming languages, you can open it and leave it open, and then close it wherever you need to.
I think it would be really helpful if this could be made clear in the wiki plugin configuration.
--
Alex
If you wish to use the Wiki plugin and still be able to put some HTML tags in your posts, here's what you can do:
Just enclose the HTML tags between `` and ``. For example:
This is a link to ``<a href="http://www.google.com">Google</a>``
I thought that the Raw option of the wiki plugin (i.e., the `` tags) was not working. But in fact, it works. You just have to make sure that the opening and closing `` appear on the same logical line.
This isn't very intuitive. I'd have expected that, like a comment block on most programming languages, you can open it and leave it open, and then close it wherever you need to.
I think it would be really helpful if this could be made clear in the wiki plugin configuration.
--
Alex
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Can you check if your serve rhas a global Pear Wiki installation? this could override the bundled library and thus a bug could slip into it, if your global pear installation is outdated.
If only the wiki pear library weren't so large, then it could be investigated why the entities and other options don't take effect more easily.
Regards,
Garvin
Can you check if your serve rhas a global Pear Wiki installation? this could override the bundled library and thus a bug could slip into it, if your global pear installation is outdated.
If only the wiki pear library weren't so large, then it could be investigated why the entities and other options don't take effect more easily.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
alemartini
- Regular
- Posts: 16
- Joined: Sat Oct 11, 2008 10:43 pm
Garvin, I think that you've made a very interesting point in your last post, for which I thank you. I hadn't thought about the fact that a shared PEAR setup could be somehow interfering with the Wiki plugin behaviour.
Until now, all of my tests were performed on a shared hosting environment (Dreamhost). The server on which I'm hosting my blog is running PHP 5.2.6, and no traces of PEAR show up when calling phpinfo() (not sure if any information about PEAR should appear there though).
From the hosting provider knowledge base, I can see that: "Dreamhost includes only a bare set of PEAR modules on shared hosting accounts". And BTW, the Text_Wiki package is not part of that setup as far as I can tell.
If I run pear -V from the command line, I can see that the version they are running is 1.5.0.
I decided to rule out possible conflicts with shared PEAR setups, and to do that I set up a local system with Debian Etch (base install), to which I added Apache 2.2.3, PHP 5.2.0 and MySQL 5.0.32. I did not install any version of PEAR or any other special packages besides those.
Then I performed a new Serendipity install (simple setup), and finally I added the Wiki plugin.
Unfortunately, the problem can be reproduced on the local system, and HTML entities always get escaped, no matter what.
Note that this is the exact same problem that was reported by Flominator more than 6 months ago (see this thread).
I wonder what is the current status of the Wiki plugin (I mean, if it is up to date or still being supported). By looking at the bundled-libs directory, I can see that the Text_wiki package that is included with the latest s9y release is rather oudated (the files go back to July 2005, when the latest stable release of the Text_wiki PEAR package is from June 2007).
I am pretty sure that three years ago the Wiki plugin was working flawlessly, but it seems that something got broken along the way. And since I jumped straight from Serendipity 0.7.x to the latest release, I couldn't tell for sure when it stopped working. [*]
--
Alex
[*] Ok, I couldn't resist going back in time so I've just installed s9y 0.8.1. Now I can tell for sure that the Wiki plugin worked like a charm. If you tell it not to escape HTML entities, you'll never see any HTML tags on your posts. It worked as expected. The only noticeable difference that I can see with that version of the plugin (from a user interface point of view) is that all the markup rules where turned off by default, and you had to manually enable the ones you wanted to use.
Until now, all of my tests were performed on a shared hosting environment (Dreamhost). The server on which I'm hosting my blog is running PHP 5.2.6, and no traces of PEAR show up when calling phpinfo() (not sure if any information about PEAR should appear there though).
From the hosting provider knowledge base, I can see that: "Dreamhost includes only a bare set of PEAR modules on shared hosting accounts". And BTW, the Text_Wiki package is not part of that setup as far as I can tell.
If I run pear -V from the command line, I can see that the version they are running is 1.5.0.
I decided to rule out possible conflicts with shared PEAR setups, and to do that I set up a local system with Debian Etch (base install), to which I added Apache 2.2.3, PHP 5.2.0 and MySQL 5.0.32. I did not install any version of PEAR or any other special packages besides those.
Then I performed a new Serendipity install (simple setup), and finally I added the Wiki plugin.
Unfortunately, the problem can be reproduced on the local system, and HTML entities always get escaped, no matter what.
Note that this is the exact same problem that was reported by Flominator more than 6 months ago (see this thread).
I wonder what is the current status of the Wiki plugin (I mean, if it is up to date or still being supported). By looking at the bundled-libs directory, I can see that the Text_wiki package that is included with the latest s9y release is rather oudated (the files go back to July 2005, when the latest stable release of the Text_wiki PEAR package is from June 2007).
I am pretty sure that three years ago the Wiki plugin was working flawlessly, but it seems that something got broken along the way. And since I jumped straight from Serendipity 0.7.x to the latest release, I couldn't tell for sure when it stopped working. [*]
--
Alex
[*] Ok, I couldn't resist going back in time so I've just installed s9y 0.8.1. Now I can tell for sure that the Wiki plugin worked like a charm. If you tell it not to escape HTML entities, you'll never see any HTML tags on your posts. It worked as expected. The only noticeable difference that I can see with that version of the plugin (from a user interface point of view) is that all the markup rules where turned off by default, and you had to manually enable the ones you wanted to use.
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
I tried to look at it, but I gave up when seeing all those tiny files and the complex rendering/parsing algorithm by the Wiki pear module.
I upgrade the wiki module to 1.2.0 but this does not change anything.
I try to contac the author of the plugin.
Regards,
Garvin
I tried to look at it, but I gave up when seeing all those tiny files and the complex rendering/parsing algorithm by the Wiki pear module.
I upgrade the wiki module to 1.2.0 but this does not change anything.
I try to contac the author of the plugin.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
alemartini
- Regular
- Posts: 16
- Joined: Sat Oct 11, 2008 10:43 pm
-
alemartini
- Regular
- Posts: 16
- Joined: Sat Oct 11, 2008 10:43 pm
Re: HTML code shows up when using Wiki markup plugin
Hi Garvin! I was wondering if there were any news about this issue.
Do you know if it's fixed in the latest s9y release? I'd gladly perform an upgrade if this problem got solved (I'm still running version 1.3.1).
Thanks,
Alex
Do you know if it's fixed in the latest s9y release? I'd gladly perform an upgrade if this problem got solved (I'm still running version 1.3.1).
Thanks,
Alex
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: HTML code shows up when using Wiki markup plugin
Hi!
Sadly not, Tobias Schlitt is no longer maintaining the package, and I am unable to understand the coding of the PEAR code, so sadly I cannot provide any help.
If you are willing to put some more energy into it, you could try to reach PEAR Wiki support people/developers (if there are still any) to ask them if they could have a look...?!
Regards,
GArvin
Sadly not, Tobias Schlitt is no longer maintaining the package, and I am unable to understand the coding of the PEAR code, so sadly I cannot provide any help.
If you are willing to put some more energy into it, you could try to reach PEAR Wiki support people/developers (if there are still any) to ask them if they could have a look...?!
Regards,
GArvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: HTML code shows up when using Wiki markup plugin
the problem is somewhat solved... or at least you can find some hints in http://board.s9y.org/viewtopic.php?f=3&t=14915&p=85222