We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Blockquotes using Markdown in a wiki [Solved]

Development and Programming

jschutt's avatar
jschutt
452 posts
17 years ago
jschutt's avatar jschutt

I am having some trouble with the markdown plugin rendering a blockquote? It is just leaving the > untouched.

Anyone else?

[Mod edit: Moved to Plugin Discussion forum]

       
jschutt's avatar
jschutt
452 posts
17 years ago
jschutt's avatar jschutt

It also seems that the definition list is not rendering either.

I noticed the plugin was released in 04. Is it possible that there are newer versions of Markdown that the current plugin does not support?

       
kirkaracha's avatar
kirkaracha
273 posts
17 years ago
kirkaracha's avatar kirkaracha

PHP Markdown Extra (forum thread) does definition lists, and I think it would also do blockquotes.

       
jschutt's avatar
jschutt
452 posts
17 years ago
jschutt's avatar jschutt

Yes, I did switch over to PHP Markdown Extra but I just can’t get the blockquote to render. I’ve even copied the code directly from John Gruber’s site!

       
Lisa Wess's avatar
Lisa Wess
20,502 posts
17 years ago
Lisa Wess's avatar Lisa Wess

Ok, so I just tested this and it outputs a blockquote perfectly. Can you let us know how you’re using it? Have you set it as that field’s formatting, or are you calling it in a template? Also, what exactly are you putting in your entry?

I did this:

> This is
> a blockquote

and it also worked without the space between the > and the text.

Also make sure you download a fresh copy of the plugin, as it has been updated since its initial release; and that’s the one I’m testing with, a fresh download as of today.

       
jschutt's avatar
jschutt
452 posts
17 years ago
jschutt's avatar jschutt

Lisa,

Here is the context:

I am using it in a wiki with the text formating for articles set to “Markdown”. Any time I use

> This is
> a blockquote

I just get

> This is > a blockquote
       
Lisa Wess's avatar
Lisa Wess
20,502 posts
17 years ago
Lisa Wess's avatar Lisa Wess

Aha, in the wiki. Back in a jiffy.

       
jschutt's avatar
jschutt
452 posts
17 years ago
jschutt's avatar jschutt

It’s probably not that big of a deal as I have just been using

<blockquote></blockquote>

instead. That works just fine.

       
Lisa Wess's avatar
Lisa Wess
20,502 posts
17 years ago
Lisa Wess's avatar Lisa Wess

You need to allow all HTML for this to work in the wiki. I was able to replicate your issue with “allow only safe html”.

       
jschutt's avatar
jschutt
452 posts
17 years ago
jschutt's avatar jschutt

I wonder why this would not fall into the “safe html” category.

       
jschutt's avatar
jschutt
452 posts
17 years ago
jschutt's avatar jschutt

Thanks for your help with this!

       
Lisa Wess's avatar
Lisa Wess
20,502 posts
17 years ago
Lisa Wess's avatar Lisa Wess

Ok, been chatting with Derek and I finally grok what is going on. <blockquote> is safe HTML, certainly (you can find this in core.typography.php if you are curious), however, Markdown uses > to indicate a blockquote. The template parser is converting the > to its character entity before Markdown ever gets involved. That’s why switching it to allow all HTML allows it to work.

You could hack the plugin to use a different notation for blockquotes, as one possible action. You could use a different plugin, of course.

       
jschutt's avatar
jschutt
452 posts
17 years ago
jschutt's avatar jschutt

Ah, that makes sense. I think I will just leave it with allowing all html as this wiki is not open to public additions. Only people within our organization will be able to change anything.

Thanks for the explanation.

As always - very helpful!

       
Derek Jones's avatar
Derek Jones
7,561 posts
17 years ago
Derek Jones's avatar Derek Jones

Keep in mind that even with Allow All HTML, user input is sanitized against “naughty” tags as well as XSS attacks. Mistakes or unwanted tags that slip in otherwise (such as layout-breaking closing divs) can typically be handled in wikis with the regular article moderation that happens in such environments.

       
jschutt's avatar
jschutt
452 posts
17 years ago
jschutt's avatar jschutt

Sounds good. Thanks for the note!

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.