Single line Thread Preview on main page may be several lines long.

Joined
Apr 23, 2018
Messages
1,071
Description: Post Preview generator for the main page barfs on some tags, creating previews several lines long.

Cause:
All of the following bbcode is known to trigger this bug:
[ul][*]list
[*]ul
[*]ol
[*]h1
[*]h2
[*]h3
[*]h4
[*]hr
[*][*]
[/ul]
Note, ALL of these bbcode generate newlines when used.

Scope:
Visible to all visitors on the main page. Stays on the page for at least 10 minutes, longer during periods with few posts.

Symptoms:
A newline is placed before and after the bugged tag.
An empty bugged tag is equivalent to a single line break (newline after merges with the newline before).
Every bullet goes on its own a newline.
Newlines inside and outside bugged tags are not preserved (although the tags themselves generate a newline).
Newlines not generated by tags are still replaced with spaces.

Error occurs whenever a bugged tag is present, even when outside of the normal preview range.
  • Text before the first bugged tag is processed normally.
  • Text before the first bugged tag is shortened properly, including the end of preview '...'.
  • All text AFTER the first bugged tag is word-wrapped, both within and after the tag.
  • No text AFTER the first bugged tag is shortened. The preview contains all text AFTER the first bugged tag.
Most formatting BBCode after the first bugged tag is fully processed.
  • h1 generates a large header in the preview.
  • url generates a clickable link
  • img does NOT create an image, but the text placeholder "(image)" instead.
  • spoilers are hidden. all content inside of them and the button as well is not displayed.
Non-BBCode does not have any special processing. https://mangadex.org does not create a clickable link unless it is in a url tag.

Examples: images ->
Here are examples of what it looks like on the main page. As you can tell, they are slightly longer than 1 line
Example 1: What's the worst isekai on here and what's the best isekai on here?
(example image defunct)
Example 2: Any Tux users floating about? (Example image screenshotted by @WhoSainT)
unknown.png
 
Joined
Apr 23, 2018
Messages
1,071
Examples of all posts that would trigger this.

list​
Code:
This text will most certainly be shortened to something reasonably small and most definitely not continue on forever.
This sentence here has 0.0% chance of showing up in the preview. [[s][/s]list]This will be displayed and completely unshortened despite the fact that the sentence above it was cliped out.[[s][/s]/list]
Anything and everything after the list tag is also displayed. Nothing past it is clipped/shortened, just word wrapped.

ul​
Code:
This text will most certainly be shortened to something reasonably small and most definitely not continue on forever.
This sentence here has 0.0% chance of showing up in the preview. [[s][/s]ul]This will be displayed and completely unshortened despite the fact that the sentence above it was clipped out.[[s][/s]/ul]
Anything and everything after the ul tag is also displayed. Nothing past it is clipped/shortened, just word wrapped.

ol​
Code:
This text will most certainly be shortened to something reasonably small and most definitely not continue on forever.
This sentence here has 0.0% chance of showing up in the preview. [[s][/s]ol]This will be displayed and completely unshortened despite the fact that the sentence above it was clipped out.[[s][/s]/ol]
Anything and everything after the ol tag is also displayed. Nothing past it is clipped/shortened, just word wrapped.

h1​
Code:
This text will most certainly be shortened to something reasonably small and most definitely not continue on forever.
This sentence here has 0.0% chance of showing up in the preview. [[s][/s]h1]This will be displayed and completely unshortened despite the fact that the sentence above it was clipped out.[[s][/s]/h1]
Anything and everything after the h1 tag is also displayed. Nothing past it is clipped/shortened, just word wrapped.


h2​
Code:
This text will most certainly be shortened to something reasonably small and most definitely not continue on forever.
This sentence here has 0.0% chance of showing up in the preview. [[s][/s]h2]This will be displayed and completely unshortened despite the fact that the sentence above it was clipped out.[[s][/s]/h2]
Anything and everything after the h2 tag is also displayed. Nothing past it is clipped/shortened, just word wrapped.

h3​
Code:
This text will most certainly be shortened to something reasonably small and most definitely not continue on forever.
This sentence here has 0.0% chance of showing up in the preview. [[s][/s]h3]This will be displayed and completely unshortened despite the fact that the sentence above it was clipped out.[[s][/s]/h3]
Anything and everything after the h3 tag is also displayed. Nothing past it is clipped/shortened, just word wrapped.

h4​
Code:
This text will most certainly be shortened to something reasonably small and most definitely not continue on forever.
This sentence here has 0.0% chance of showing up in the preview. [[s][/s]h4]This will be displayed and completely unshortened despite the fact that the sentence above it was clipped out.[[s][/s]/h4]
Anything and everything after the h4 tag is also displayed. Nothing past it is clipped/shortened, just word wrapped.

hr​
Code:
This text will most certainly be shortened to something reasonably small and most definitely not continue on forever.
This sentence here has 0.0% chance of showing up in the preview. [[s][/s]hr]This will be displayed and completely unshortened despite the fact that the sentence above it was clipped out.[[s][/s]/hr]
Anything and everything after the hr tag is also displayed. Nothing past it is clipped/shortened, just word wrapped.
 
Joined
Apr 23, 2018
Messages
1,071
Code:
[[i][/i]h1][[i][/i]/h1]
through
Code:
[[i][/i]h4][[i][/i]/h4]
also seem to do this. Possibly
Code:
[[i][/i]hr][[i][/i]/hr]
as well.
Another post with example below
5258e8b4-6c01-44b0-8243-e3ffe151d176.jpg

I swear I don't trigger this on purpose

Happy New Years!


Happy New Year!


Happy [ul]

New Years!


Implicit tag closing: Nested tags implicitly close with their parrent. Closing tags are 100% optional.
For really complex formatting segments, enclosing the segment in [left][/left] could be used to ensure all tags close before the next segment.
Code:
[[s][/s]b][[s][/s]i][[s][/s]u]This line has 3 opening tags which are all closed with 1 closing tag[[s][/s]/b]
This line has 3 opening tags which are all closed with 1 closing tag
This isn't normally too useful/needed. But can be done to save a lot of characters for posts with complex formatting.





This line makes use of implicit tag closingeverything is closed by the next tag. a couple hr tags left open bc they really don't have inside content, so there isn't a need to close them



Example of the most evil thing we could possibly do has been moved to this dead (deleted chapter) manga thread https://mangadex.org/thread/71390/1/#post_588992
Summary of it. Misuse of Shiny Spoiler links are not the worst thing we could do.
Uses implicit tag closing to make the post fit within the character limit (which I should probably lookup).

 

Users who are viewing this thread

Top