Italics and escaping loses sentences
-
*cough* I have a cold! and am writing a whole lot more text that you can't see because Jeff is bad at programming.
AHAHAHAHA.
-
Already posted about here:
http://what.thedailywtf.com/t/literally-wtf/4984?u=chaostheeternal
I don't know if anyone actually reported it up to meta.d though.
-
*Lets try this* with something a bit longer and see if the erasure is related to text length! Well? Now I have to type some more. Hey Jeff, you should fix your forum.
Looks like it.
*\*Lets try this\* with something a bit longer and see if the erasure is related to text length!* Well? Now I have to type some more. Hey Jeff, you should fix your forum.
-
** **Ah. I may have figured out what controls the length, at least.
*\* \**Ah. I may have figured out what controls the length, at least.
Nope.
-
*cough* Stupid mulch fire Some idiot thought it was a good idea to store tons of mulch and not do anything with it. For over two years. Now something like 300 foot acres of mulch are burning, blanketing the area in smoke.
-
As far as I remember checking when it was originally reported (but didn't post), it wasn't a random length, it's a fixed length it trims off every time.
[i]*testing*[/i]
***123456789012345678901234567890-30
****123456789012345678901234567890123456789012345678901234567890-60
*****123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890-90Looks like it's 30 characters for each escaped asterisk.
-
How about if we try something like *? Maybe it has to do with the number of *s. ** may cut off twice as much, if that is the case. It's probably that dumb guid's length. *** With three of them, it should happen to some fairly long sentences, but I can't be sure until I type quite a bit more.
I don't even know.
-
I think I found it, and edited my post above.
-
*yawn* this is getting old! And bold is broken, too!
Discforce!
-
Test 1
Input
*\**123456789012345678901234567890
Output
***123456789012345678901234567890Result
30 Characters omittedTest 2
Input
*\*\**123456789012345678901234567890123456789012345678901234567890
Output
****123456789012345678901234567890123456789012345678901234567890Result
60 Characters omittedTest 3
Input
*\*\*\*\**123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
Output
******123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890Result
120 Characters omitted
I concur with @ChaosTheEternal's conclusion. 30 characters are removed for each italicized/bolded escaped asterisk.
-
Though, as @aliceif pointed out above, it's not just when italics are involved, escaped asterisks in bold does it too.
And, actually, the bug isn't just involving asterisks. When any character used for Markdown formatting is escaped, it trims off 30 characters after the Markdown formatting is closed.
Example:
_Using underscores _ for formatting_123456789012345678901234567890
_Using underscores \_ for formatting_123456789012345678901234567890
-
Post above has been corrected.
-
this is getting old!
We're just trying to pinpoint the behavior so
wesomeone can provide a thorough report on *meta.d.* Just don't look at me, because I won't go over there.
-
Although as long as the bug is around, it's another way to have hidden text in posts, and it's even more hidden than invalid tags or comments because they won't show up in quotes either, due to Discourse only escaping HTML in quotes.
-
How about:
**1234567890*1234567890**1234567890
*\**1234567890*\**1234567890*\**1234567890
So, it only extends if the other escaped formatted symbols are within the same formatting block?
-
30 characters are removed for each italicized/bolded escaped asterisk.
strlen(md5('*')) - strlen('*') - 1 just because.
https://meta.discourse.org/t/cannot-escape-in-bolditalic-markdown/22280
http://what.thedailywtf.com/t/cannot-escape-in-bolditalic-markdown/4993/13?u=maciejasjmj
Have a crack at the code, I refuse to comprehend that regex soup.
-
The relevant link is there, but I'm kind of surprised nobody posted * which also eats a bunch of text.
-
We know, but that appears to be a slightly different bug.
What does _ this do, though?
___What does \_ this do, though?___
Hooray, a new md5!
-
___Why are they hashing any escaped chars _ ?___are you seeing this?
-
It looks like _ doesn't eat text when it's inside markup.
It does _ when the text is outside the markup.
-
It looks like b14a7b8059d9c055954c92674ce60032 doesn't eat text when it's inside markup.
You might want to take a look at the raw of my post above ...
Oh, wait, misread what you were saying.
-
\
Escaped \ seems to not break!
-
You might want to take a look at the raw of my post above ...
_So whatever's inside the markup stays ok, but stuff that's outside doesn't get through.
_ What if I put the @discoursebot
This is kind of ridiculous
-
Why are they hashing any escaped chars
I... guess it's so that they don't get gobbled up by the search-and-replace? The implementation is quite asinine, so your guess's as good as mine.
-
BEHOLD!
_b14a7b8059d9c055954c92674ce60032\_b14a7b8059d9c055954c92674ce60032_
b14a7b8059d9c055954c92674ce60032_b14a7b8059d9c055954c92674ce60032
-
We know, but that appears to be a slightly different bug.
What does _ this do, though?
___What does \_ this do, though?___
Hooray, a new md5!
Looks like @accalia's got a new hash code to play with...
-
hmm...... maaaaaaaaybe
_
-
Does this work for any non-alphanum?
_Let's find out! \~ \@ \# \_ _
*Let's find out! ~ @ # _ *EDIT: Apparently I'm the only one around here who can't break Discourse.
-
It has to be the formatting symbol you're using for the escape to bug out. The best part is, if your line had included anything else, you would have seen the original bug.
-
More specifically, it looks like it's the outer format character that does it.
*_
[code]*_[/code]
*_
[code]*_[/code]
*_
[code]*_[/code]
*_
[code]*_[/code]
-
_Let's find out! \~ \@ \# \_
_*Let's find out! ~ @ # _ *You have to be doing a multi-layer markdown encoding, such as italics and bold:
Works:
***Pre Hash \* Post Hash***
Pre Hash * Post HashDoesn't work:
**Pre Hash \* Post Hash**
Pre Hash * Post HashDoesn't work:
*Pre Hash \* Post Hash*
Pre Hash * Post Hash
-
I put it in the same thread as Maciejasjmj linked.
-
For anyone who's messing with this and has a handle on what it's doing - what happens if you deliberately include another instance (or three) of the hash itself in the post?
-
I tested a few things and got something crazy to happen:
http://what.thedailywtf.com/t/hash-italics-escapetest-playground-thing/5161/2
Seems like the hashes may get replaced with the appropiate char, under certain conditions.
-
3389dae361af79b04c9c8e7057f60cc63389dae361af79b04c9c8e7057f60cc63389dae361af79b04c9c8e7057f60cc63389dae361af79b04c9c8e7057f60cc63389dae361af79b04c9c8e7057f60cc63389dae361af79b04c9c8e7057f60cc63389dae361af79b04c9c8e7057f60cc63389dae361af79b04c9c8e7057f60cc63389dae361af79b04c9c8e7057f60cc63389dae361af79b04c9c8e7057f60cc63389dae361af79b04c9c8e7057f60cc63389dae361af79b04c9c8e7057f60cc63389dae361af79b04c9c8e7057f60cc6
Oh wow. Hashes between asterisks become asterisks.And this is just bizarre:
**b14a7b8059d9c055954c92674ce600323389dae361af79b04c9c8e7057f60cc6**_
_**b14a7b8059d9c055954c92674ce600323389dae361af79b04c9c8e7057f60cc6_**_
-
This thing is pretty much a WTF fractal at this point.
_
-
A W3389dae361af79b04c9c8e7057f60cc6T3389dae361af79b04c9c8e7057f60cc6Fractalb14a7b8059d9c055954c92674ce60032?
Filed under: *
-
A __*W3389dae361af79b04c9c8e7057f60cc6T3389dae361af79b04c9c8e7057f60cc6Fractal*b14a7b8059d9c055954c92674ce60032?__
:-D well played!
-
What's the MD5 of U+002A Asterisk?
The answer is 3389dae361af79b04c9c8e7057f60cc6.
-
I bumped that thread a few days ago. Since it's a pretty major bug and doesn't seem to have gotten any kind of official response (no "oh dear we'll look into it", not even a single like) I assumed they had missed it or something.
My post got silently deleted and there's still no response.
-
I bumped that thread a few days ago. Since it's a pretty major bug and doesn't seem to have gotten any kind of official response (no "oh dear we'll look into it", not even a single like) I assumed they had missed it or something.
My post got silently deleted and there's still no response.
Thus are the ways of the DiscoDevs.