9

Similar to the problem described in Post Overflow, long words don't break when they are placed inside <script> tags in a post.

Script tags seem to get removed when rendering, so I think the resulting text just needs to be wrapped in <p> tags to solve this problem. Or if the word wrapping is intentional, there should be a scrollbar.

Example:

wwwwwwwwwhhhhhhhhhhhhhhhhhhhhhhhhhhhhheeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee!!!!!!!!!!!!!!!!!!!

 

There is another issue that would be solved if the text was rendered inside a paragraph. There is no space after placing a paragraph after a script tag.

<script>foo</script>


bar

results in:

foo

bar

4
  • 1
    I the text is even longer, it will add a horizontal scrollbar to the whole page. – kapex Sep 28 '13 at 18:22
  • 2
    <iframe> tags also work. – Qantas 94 Heavy Sep 29 '13 at 2:33
  • Interestingly, it does not affect the suggested edits page: meta.stackoverflow.com/review/suggested-edits/18487 – Qantas 94 Heavy Sep 29 '13 at 2:43
  • @Qantas94Heavy Nice find, the compare edit page has a css rule td.post-text with word-wrap: break-word; which would also work on the default view. – kapex Sep 29 '13 at 9:21
3

word-wrap: break-word was only set on .post-text p and .post-text li (and the corresponding .wmd-preview), but it needs to be on everything (except for code blocks). Fixed in the next build.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .