HTML Special Characters July 11, 2008 10:46 AM   Subscribe

Super-trivial bug with HTML special characters.

I attempted to post an infinity symbol (∞) into this discussion. It looked correct in the Live Preview section, so I posted it. But the ampersand-hash-8734-semicolon was stripped to just say "8734." Meanwhile, the "approximately equal to" (ampersand-asymp-semicolon) worked.

My problem isn't so much that it didn't work (allowing HTML special characters is just asking for ASCII art and other junk), but that it did work in the Live Preview but not for real, resulting in my post in which I posited the the size of the universe was "approximately 8734." I suspect this is something that only comes up once in a while, but that's a pain every time it does.

It's definitely low-priority, but can the Live Preview be made to handle these things the same way that the actual system does? It could even give a warning, "HTML special characters are not allowed" or something. It'd just help if it was consistent in its behavior.

Also: previewing the post here shows the infinity symbol, but previewing a comment (who does that?) shows "8734."
posted by fogster to Bugs at 10:46 AM (31 comments total)

...and the infinity symbol works just fine on MetaTalk, making me look even more insane.
posted by fogster at 10:46 AM on July 11, 2008




Live preview is neither.
posted by yhbc at 11:01 AM on July 11, 2008 [2 favorites]


So can the Live Preview be made to also not allow numeric entities?
posted by fogster at 11:04 AM on July 11, 2008


So can the Live Preview be made to also not allow numeric entities?

I just updated live preview so numeric entities won't be converted.

Live Preview is only an approximation of what your comment will look like because the HTML doesn't get the same filtering we use on the server side. I completely understand the frustration though, and we should find a better way to filter Live Preview.
posted by pb (staff) at 11:14 AM on July 11, 2008


Live Preview ≈ what your comment will look like.
posted by cillit bang at 11:37 AM on July 11, 2008 [1 favorite]


Talk about a fast fix! Thanks. :)
posted by fogster at 11:38 AM on July 11, 2008


The size of the universe is approximately 8734 if you use the right units.
posted by lukemeister at 12:10 PM on July 11, 2008 [4 favorites]



posted by boo_radley at 12:35 PM on July 11, 2008 [1 favorite]


Same thing happened to me today. Thanks for the fix, pb.
posted by kuujjuarapik at 12:48 PM on July 11, 2008


‮‮What bug?‭
posted by loquacious at 1:27 PM on July 11, 2008 [1 favorite]


You mean the size of the universe *isn't* 8734? I'd already incorporated that figure into several important calculations.
posted by ikkyu2 at 2:32 PM on July 11, 2008


Goddamnit, PB. Did you just fix the reverse HTML entity escaping issue?

Now how am I going to whore for favorites?
posted by loquacious at 2:39 PM on July 11, 2008


Oh wow, awesome! The & problem has also been fixed in Preview. I dunno when this happened, but it's something that's bugged me for years. Yay.
posted by zsazsa at 2:40 PM on July 11, 2008


I keep this page bookmarked and do the cut-'n'-paste thing. It gives me terrifying powers.

░░░░░░▒▒▒▒▓▓█▓▓▒▒▒▒░░░░░░

posted by quin at 3:07 PM on July 11, 2008


Did you just fix the reverse HTML entity escaping issue?

I half-fixed it. The comment text is still reversed but the special Unicode spell won't reverse the byline anymore.
posted by pb (staff) at 3:21 PM on July 11, 2008


I'm hyped and I'm &ed!
posted by lukemeister at 3:31 PM on July 11, 2008


▓√╬

Wow! That's way swell! Thanks, quin.
posted by Kattullus at 3:35 PM on July 11, 2008


wtf-8?
posted by aubilenon at 3:57 PM on July 11, 2008 [2 favorites]


╔═════════════╗
║░░░░░░░░░░░░░║
║░░░░░░░░░░░░░║
║░░░░░░░░░░░░░║
║░░░░░░░░░░░░░║
║░░░░░░░░░░░░░║
║░░░░░░░░░░░░░║
╚═════════════╝
posted by phrontist at 6:21 PM on July 11, 2008


You know what's NOT a trivial problem?

It's nearly impossible to post code here, despite numerous askMe questions that ask for source code.

Honestly, even for SQL, which is.'t highly formatted, it takes nearly as long to get teh formatting right as to answer the question.

When it becomes undily burdensome to answer questions, they won't be answered as well, or at all.

Please, fix the pre tag to not double-space, and to turn < and > into HTML entities so posters don't have to.
posted by orthogonality at 7:36 PM on July 11, 2008 [1 favorite]


...and to turn < and > into HTML entities so posters don't have to.

The problem with this is that it's difficult to know posters' intentions. When someone types "<b>", do they want to show how to write a bold tag, or do they want the following text to be bold? I don't think we'll be adding a UBB style [code] tag, so the only way we know something should be escaped is to use the named HTML entity for the particular special characters. That's why we recommend linking to pastebin for sharing code snippets. pastebin expects everything to be a code example and even offers syntax highlighting.

Please, fix the pre tag to not double-space...

We're working on the double-spaced <pre> and <blockquote> tag issue, and it's been fixed here in MeTa and Recent Activity. (You can test it out here.) We're rolling it out slowly to make sure it's solid before we add the fix to MeFi and Ask.
posted by pb (staff) at 8:02 PM on July 11, 2008


pb writes "The problem with this is that it's difficult to know posters' intentions."

I only meant within a pre block.

Using pastebin is a loss because it doesn't stay around; people with the same problem who find the askMe months later won't be able to find the code snippet.
posted by orthogonality at 8:35 PM on July 11, 2008


int main( int argc, char** argv) {
    return argc > 1 ;
}
posted by orthogonality at 8:37 PM on July 11, 2008


Oh, ok. It's doing what I want in Meta. Cool.
posted by orthogonality at 8:38 PM on July 11, 2008


I only meant within a pre block.

Ahh, I see. That would be changing the behavior of the <pre> tag just for MetaFilter, though. I can see how that would be handy for sharing code, but it might get confusing for other uses of the <pre> tag for other types of questions.

I didn't realize pastebin samples expired, but now that you mention it I think that has come up before. Hmm. Hopefully fixing the double-spacing issue will help, but it's not a complete solution.
posted by pb (staff) at 9:14 PM on July 11, 2008

Blockquote blockquote make me happy
Blockquote blockquote test test test
posted by barnacles at 10:29 PM on July 11, 2008 [1 favorite]


one
line
posted by aubilenon at 1:01 PM on July 12, 2008


Sweet! (it's still busted in preview though)
    MARIO                                         WORLD                     TIME
    050100                  () x 43                6-2                       157

                              
                              
                                  .--.
                                 /O  o\
                                (___o__)
 _________                        |  |
|          |[__][__][__][__][__][__][__][__][__][__][__][__][__][__][__][__][__][__]
| c      c ||][__][__][__][__][__][__][__][__][__][__][__][__][__][__][__][__][__][|
|          |[__][__][__][__][__][__][__][__][__][__][__][__][__][__][__][__][__][__]
|          ||][__][__][__][__][__][__][__][__][__][__][__][__][__][__][__][__][__][|
| c      c |[__][__][__][__][__][__][__][__][__][__][__][__][__][__][__][__][__][__]
|__________||][__][__][__][__][__][__][__][__][__][__][__][__][__][__][__][__][__][|




                                                                         __________
                                                                        |   ___    |
                                                                        |  / _ \   |
                                                                        |  -  ) |  |
                                                                        |    / /   |
                                                                        |    -     |
                                                                        |____O_____|


    _-.                                                             
   /__M\_                                                                    
   G o o                                                                    
   \`wOw'    n                                                                    
  _ `--'_   ( 3                                                                    
 / \=-=\ -_/ /                                                                    
/ . |___|.__/                                                                    
\ \ O  O | '                                                                    
 (3)==D==|                           /3                                                    
   |  \  \                          / 3                                                    
   |  |\  \                        / 3                            .--.                          
  /'  ) (  )                      (  3                           /    \                            
 / _/   |  |                  oO)  \3                           (_Ò__Ó_)                            
 (' \   |.-                  (_ |  _\|-|--._                      |  |                         
  \(_)  \_(_)                  || / \__|__/ \                   ( \  / )                             
[__][__][__]                   ||/\_/_____\_/\              [__][__][__][__][__][__]                                                                                                         
|][__][__][|                   \(_____________)             |][__][__][__][__][__][|                                                                   
[__][__][__]                     _//      _\\               [__][__][__][__][__][__]                                                       
|][__][__][|                    (__|     (__|               |][__][__][__][__][__][|                                                       
[__][__][__]                                                [__][__][__][__][__][__]                                                       
|][__][__][|                                                |][__][__][__][__][__][|                                                       
                                                   

                              
posted by aubilenon at 1:04 PM on July 12, 2008 [2 favorites]


What? When did we get the image tag back?
posted by DreamerFi at 2:18 PM on July 12, 2008


It's-a he!
posted by cortex (staff) at 3:39 PM on July 12, 2008


« Older Bay Area Meetup?   |   monkey king Newer »

You are not logged in, either login or create an account to post comments