How do I disable Markdown completely?

(Alfuken) #1

Basically, title says it all. How do I disable Markdown for the whole forum? Same question about BBCode and HTML.

The only thing that should be allowed to be formatted - is line breaks.


(Jeff Atwood) #2

There is no way to do this at the current time.

(Alfuken) #3

What if I replace PrettyText.cook on line 266 sanitized = markdown(working_text, options) to sanitized = working_text ? And remove the preview pane for the comment.

(Kane York) #4

Then you’re going to have a “fun” time when you go to upgrade Discourse.

What’s the reasoning behind this? Would hiding the composer toolbar work for you?

(Alfuken) #5

I’m not going to upgrade then.

Reasoning is that someone has typed a list of 20 rows, each prefixed by “#”. Now I have 20 H1’s and SEO manager gives me headaches saying that Google doesn’t like when there’s more than 1 H1 per page.

So yes, it’s critical for me to remove this “feature” completely and avoid such things in the future.

(Joshua Rosenfeld) #6

Could you simply blacklist #?

(Alfuken) #7

How do I blacklist all the markdown tags?

(Mittineague) #8

The SitePoint forum is a web dev forum.

Hence very often code that contains the hash symbol in a comment or CSS gets posted.

If a new member does not fence the code, it makes for some rather unsightly posts.

I’d even go so far to say that posts that require reformating because of that, and HTML tags that don’t get displayed, are probably the most common Moderator “task”.

(William Di Luigi) #9

Why don’t you just edit the post? (e.g. by changing # to - which will render as a proper list)

(William Di Luigi) #10

On a slightly unrelated note, what your SEO manager said appears to be a misconception or, at least, not true anymore starting from HTML5.

(Alfuken) #11

Are you seriously offering to edit each and every post that accidentally contains HTML?..

The task is not limited to just hashtags, the task is to disable Markdown completely, or to either simply strip any HTML except line breaks from the post content.

(Alfuken) #12

Well, unfortunately she trusts the consulting company (SearchMetrics) more than she trusts me, and higher management is on her side. I’m not in a position to choose.

(William Di Luigi) #13

It’s much easier than effectively forking discourse (thus missing updates, possibly exposing your forum to security risks).

Moreover, it’s not like you will encounter this issue every day of the year: I have had a discourse instance running for almost 2 years and I never felt this was an issue :confused:

Or what about reddit? They use markdown as well.

My impression is that you don’t like Markdown, and that’s OK, but consider the fact that maybe your users would like it :slight_smile:

(Alfuken) #14

Well, we’re effectively already forked it, as we had to remove infinite scrolling and add normal pagination (took 2 days to implement, while some Dev on this forum stated that this would take 2 months); customised the url structure to fit the needs (which was actually PITA, as someone not really smart obviously hardcoded all the routes in JS as string instead of using EmberJS routing mechanism. Had to search and replace tons of strings); hacked the routes to handle more than 2 levels of categories; So… Yeah, I’d say “forking discourse” is not a big issue right now. :wink:

And no, you’re wrong, I like Markdown, but this is a task from higher in the hierarchy and not something to discuss.

PS. I’m starting to think that picking Discourse was a bad idea after all - it’s really PITA when it comes to customisation and tweaking.

(Rafael dos Santos Silva) #15

You want a Forum system, with:

  • No infinite scrolling
  • Different routing scheme
  • Different category nesting
  • No markdown

After searching a bit you picked Discourse.

I guess the problem isn’t on Discourse.

(William Di Luigi) #16

Well, after all, “Discourse is built for the next 10 years of the Internet”, and you guys changed it to become a classic 1990 forum with pagination, so… yeah, the higher hierarchy could have thought that out a bit more :smile:

(Eli the Bearded) #17

At this point, you seem to have a Discourse like forum that is not Discourse.

But I expect after you’ve done all that, you’d find that it shouldn’t be too hard to leave markdown in place, but disable the parts that produce H1, H2, etc, tags.

(Alfuken) #18

Not me, mate. Not me. I just need an easy way to disable markdown. Though it seems like there’s no easy way to do it. Oh well.

(Alfuken) #19

Infinite scrolling is not “the next 10 years”. It’s not evolution either. This feature is quite debateable even as of now. It was first implemented years and years ago and it still hasn’t received a widespread use just because it’s not what people need. It’s just another “meh”. And it works crappy for websites who make their income with ads.

Also, Discourse is effing seriously slow on mobile devices, especially on Android. And that’s the result of falling into a hype of EmberJS. Too much JS. Too much AJAX. Too heavy. If it’s “modern”, doesn’t mean it’s better. But it’s a subject of another discussion.

(Rafael dos Santos Silva) #20

Facebook ticks all the boxes I think.