Now in master: ES6 Modules + Text Rendering

Thanks, fixed here:

https://github.com/discourse/discourse/commit/88c668705056dd68665f1ee4097e0c00d4e31728

3 Likes

We cut a new release this morning (1.6 beta 11), and immediately afterwards I merged this branch in. If you’re running tests-passed you will get the new ES6 functionality. The code is due to make it into the next beta release.

We’ve had few regressions so I suspect it will be smooth but please continue to report issues here if you encounter them on your discourse instances!

4 Likes

The bbcode color plug-in seems to also be broken:
https://github.com/discourse/discourse-bbcode-color

Hmm that will affect some customers if so @eviltrout.

That should fix it :strawberry:

https://github.com/discourse/discourse-bbcode-color/commit/5266de62e9ed80165303c9c7486f616063f9041d

6 Likes

I’m not up to date with the new API, but I think the vbulletin bbcode might be broken too.

3 Likes

It definitely did break that plugin. I’ve just updated it, thanks!

https://github.com/discourse/vbulletin-bbcode/commit/032a37fb6b4c9b727df5884e2f1daac19530c81c

4 Likes

Sorry it’s me again, I just found out this discourse-emoji plugin is broken too

It allows us to add some custom emojis and organize them (after the uploaded ones on the admin sections), which is useful when we have a lot of emojis (I’ve added a lot of flags, and I’ve been able to not have them mixed up with others emojis thanks to this plugin for example)

2 Likes

Yup it’s been reported. Just haven’t gotten around to it yet! Thanks.

2 Likes

I didn’t remember that, even though it was only 9 days ago…

Sorry about that :sweat_smile:

This is now fixed!

8 Likes

Thanks @eviltrout for the commit.

Something weird is happening tho, the emojis appears well in the titles and the preview (when we compose the post), but in the cooked post, they don’t appear.

If you need to test something, here is the base plugin we used : https://github.com/discourse/discourse-emoji

2 Likes

I’m seeing similar results on my setup too (now that I had a chance to test it)

1 Like

Oops! Boy is my face red! I did think the feature seemed easier than I thought to reimplement! Here’s a fix for the fix :slight_smile:

https://github.com/discourse/discourse/commit/af266acac150b16f23a9e9886311d6c9150bc936

7 Likes

Many thanks @eviltrout, I’ve confirmed it to be working.

6 Likes

Am I correct in thinking that app/assets/javascripts/pretty-text/white-lister.js.es6 is the replacement for the old app/assets/javascripts/defer/html-sanitizer-bundle.js ?

There are descrepancies in what tags were apparently allowed through in html-sanitizer-bundle and what are listed as being allowed in white-lister.

Anything not flagged as UNSAFE (& 16) apparently were allowed. That list is a lot longer than the list in white-lister:

a // allowed in white-lister
abbr // EDIT: now allowed
acronym
address
article
aside // allowed in white-lister
b // allowed in white-lister
bdi
bdo
big
blockquote // allowed in white-lister
br // allowed in white-lister
caption
cite
code // allowed in white-lister
col
colgroup
data
dd // EDIT: now allowed
del // EDIT: now allowed
details
dfn
dir
div // allowed in white-lister
dl // EDIT: now allowed
dt // EDIT: now allowed
em // allowed in white-lister
figcaption
figure
h1 // allowed in white-lister
h2 // allowed in white-lister
h3 // allowed in white-lister
h4 // allowed in white-lister
h5 // allowed in white-lister
h6 // allowed in white-lister
header
hgroup
hr // allowed in white-lister
i // allowed in white-lister
iframe // allowed in white-lister
img // allowed in white-lister
ins // EDIT: now allowed
kbd // allowed in white-lister
label
legend
li // allowed in white-lister
meter
nav
nobr
ol // allowed in white-lister
p // allowed in white-lister
pre // allowed in white-lister
q
s // EDIT: now allowed
samp
section
small // allowed in white-lister
span // allowed in white-lister
strike // allowed in white-lister
strong // allowed in white-lister
sub // EDIT: now allowed
summary
sup // EDIT: now allowed
tfoot
time
track
tt
u
ul // allowed in white-lister
var
wbr

Now, I’ve never needed <wbr> <!-- WordBReak -->, but some of the others are certainly useful: underline, dictionary lists, abbr, etc. (Useful does not mean I have ever used them in Discourse, but I do use them in HTML I write.) Was it the intention to winnow the allowed tag list so thoroughly?

Edit July 26: corrected for @sam’ and @eviltrout’s changes.

1 Like

I just bumped a few extra tags through so you can remove ins, del, abbr, dl, dt, dd from that list of yours :slight_smile:

https://github.com/discourse/discourse/commit/521d3d11f274b38b8cb3d8661d060dfbc64ce8d0

7 Likes

I can I make a cassse for sssome more sss tagsss?

You have <strike>, why not the short cut <s>? Same functionality.
Users can fake sub and ˢᵘᵖ text through trickery, why not make it legit with <sub> and <sup> tags?

4 Likes

This used to work too, unsure why it would now be removed :disappointed:.

3 Likes

I’ve added <sup>, <sub> and <s> as well as added tests for the extra tags sam whitelisted last night so that we don’t lose them again in the future:

https://github.com/discourse/discourse/commit/fbfd3124a0ab6bb249d3577f96a188987df86a8e

10 Likes