JS error typing ";)" in the text editor


(Camille Roux) #1

Hi,

When I type “;)” at the beginning of a message in my Discourse install (can’t reproduce it here), I get the following error:

TypeError: Cannot read property ‘slice’ of undefined
at s (https://forum.humancoders.com/assets/vendor-e79862c12dae96912e251ccc2db43881.js:15:16374)
at s (https://forum.humancoders.com/assets/vendor-e79862c12dae96912e251ccc2db43881.js:15:17400)
at s (https://forum.humancoders.com/assets/vendor-e79862c12dae96912e251ccc2db43881.js:15:17400)
at Object.p.toHTMLTree (https://forum.humancoders.com/assets/vendor-e79862c12dae96912e251ccc2db43881.js:15:21072)
at Object.Discourse.Dialect.cook (https://forum.humancoders.com/assets/application-5a129f751545c1a6f7fe41d62befe89e.js:3:28082)
at Object.makeHtml (https://forum.humancoders.com/assets/application-5a129f751545c1a6f7fe41d62befe89e.js:2:15275)
at d (https://forum.humancoders.com/assets/application-5a129f751545c1a6f7fe41d62befe89e.js:7:19627)
at later (https://forum.humancoders.com/assets/application-5a129f751545c1a6f7fe41d62befe89e.js:7:19808)

The emoji plugin is disable, maybe the error come from it (what do you think @zogstrip?).


(Robin Ward) #2

There was a indeed bug when disabling emoji. Here’s a fix in master:

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


(Jeff Atwood) #3