Simple Machines Community Forum

SMF Development => Bug Reports => Topic started by: spiros on February 03, 2021, 03:54:56 AM

Title: 2.0.18 <> bug with greater/less than symbols appearing in board index
Post by: spiros on February 03, 2021, 03:54:56 AM
If you check the last post on board index, if it contains a < or > symbol, it will be displayed as lt and gt there, but it will be rendered ok on the actual topic page.

Example Urls
https://www.translatum.gr/forum/index.php
https://www.translatum.gr/forum/index.php?topic=990762.0

And see the last image, same thing happening on this board.
Title: Re: 2.0.18 <> bug with greater/less than symbols appearing in board index
Post by: Antechinus on February 03, 2021, 04:03:32 AM
This should probably be in Bug Reports. I can see the problem live on the board index right now.
Title: Re: 2.0.18 <> bug with greater/less than symbols appearing in board index
Post by: spiros on February 03, 2021, 04:24:45 AM
Yes, sorry, somebody please move.
By the way, did you make the dark theme for SMF.org a standard theme?
Title: Re: 2.0.18 <> bug with greater/less than symbols appearing in board index
Post by: Dzonny on February 03, 2021, 04:31:54 AM
Topic moved, thanks for reporting, seems like there's a bug indeed.
Title: Re: 2.0.18 <> bug with greater/less than symbols appearing in board index
Post by: Antechinus on February 03, 2021, 04:52:20 AM
Quote from: spiros on February 03, 2021, 04:24:45 AM
Yes, sorry, somebody please move.
By the way, did you make the dark theme for SMF.org a standard theme?
Not yet. I've just been using it here, and on a couple of other sites, running straight from my browser. :D
Title: Re: 2.0.18 <> bug with greater/less than symbols appearing in board index
Post by: spiros on February 03, 2021, 04:54:46 AM
Great, I have been using it ever since and I cannot use this site in any other way now!
Title: Re: 2.0.18 <> bug with greater/less than symbols appearing in board index
Post by: Antechinus on February 03, 2021, 05:00:14 AM
Same here. I even made a slightly different version for Elkarte so I could use that too. I love the thing.

Anyway, we probably should stop hijacking the bug report. ;)
Title: Re: 2.0.18 <> bug with greater/less than symbols appearing in board index
Post by: GigaWatt on February 03, 2021, 07:26:45 AM
Actually, I'm not seeing this on my forum and on this one as well.

(https://i.imgur.com/KW0G8SJ.png)
Title: Re: 2.0.18 <> bug with greater/less than symbols appearing in board index
Post by: Antechinus on February 03, 2021, 07:32:21 AM
Ok, I'll bump this topic now. Check the board index before the last post is replaced by another topic. The bug was visible earlier when this topic had the last post on the board index,

IOW, your screenshot is not relevant, because it's not of the relevant content.
Title: Re: 2.0.18 <> bug with greater/less than symbols appearing in board index
Post by: Antechinus on February 03, 2021, 07:34:48 AM
And right on cue...
Title: Re: 2.0.18 <> bug with greater/less than symbols appearing in board index
Post by: Dzonny on February 03, 2021, 07:36:21 AM
Yeah, it's happening here for sure.
Title: Re: 2.0.18 <> bug with greater/less than symbols appearing in board index
Post by: GigaWatt on February 03, 2021, 07:57:18 AM
Quote from: Antechinus on February 03, 2021, 07:32:21 AM
IOW, your screenshot is not relevant, because it's not of the relevant content.

But... it's from the board's last post, the last attachment in spiros's first post is from that ???.

Quote from: Antechinus on February 03, 2021, 07:34:48 AM
And right on cue...

Yeah, but it shows up only if the topis starts with "2.0.18" in the title.

(https://i.imgur.com/KElqThA.png)

And it doesn't show up on my forum if "2.0.18" is present in the title as a string.

(https://i.imgur.com/4QFfRVL.png)
Title: Re: 2.0.18 <> bug with greater/less than symbols appearing in board index
Post by: Dzonny on February 03, 2021, 08:00:16 AM
I think you misunderstood what the bug here is :)

Take a closer look at this topic and its actual title here in post and then on board index. You'll notice the "lt" on board index, like this: <lt> :)
Title: Re: 2.0.18 <> bug with greater/less than symbols appearing in board index
Post by: spiros on February 03, 2021, 08:01:23 AM
GigaWatt, try reading again the original post. This issue only occurs if these characters are used in title: <>
Perhaps it could also appear with similar characters like the ampersand (&).
Title: Re: 2.0.18 <> bug with greater/less than symbols appearing in board index
Post by: Dzonny on February 03, 2021, 08:14:42 AM
Exactly. I can confirm that it happens of 2 of my forums as well, both updated to 2.0.18 using patch file.
Title: Re: 2.0.18 <> bug with greater/less than symbols appearing in board index
Post by: GigaWatt on February 03, 2021, 08:40:11 AM
OK, I think I can reproduce it ;). It's kinda hard to reporoduce, LOL :D.

It only happens if either <, > or both < and > are present in the title, BUT only if 2, 0 and 18 is also present in the title. Doesn't matter if it's 2.0.18, 2.0. 18, 2 0 18, as long as they are separated with at least one character (any will do, tried it with letters too, as long as they're not other digits).

AND, the title has to contain at least 6 separate strings separated with white spaces, including the 2 0 18 "string" (I'll consider it as whole string, even though the bug appears even if 2, 0 and 18 are separated with white spaces) and either or both < and > are present, either next to each other (which is considered as a whole string) or separated with a white space. If they're. If there are 5 or less, the bug doesn't appear.
Title: Re: 2.0.18 <> bug with greater/less than symbols appearing in board index
Post by: spiros on February 03, 2021, 08:53:54 AM
Quote from: GigaWatt on February 03, 2021, 08:40:11 AM
It only happens if either <, > or both < and > are present in the title, BUT only if 2, 0 and 18 is also present in the title. Doesn't matter if it's 2.0.18, 2.0. 18, 2 0 18, as long as they are separated with at least one character (any will do, tried it with letters too, as long as they're not other digits).

How did you come to that conclusion about numbers, etc? Have a look here (use find in page for >gt )
https://www.translatum.gr/forum/index.php

Or check the images I posted in opening post.
Title: Re: 2.0.18 <> bug with greater/less than symbols appearing in board index
Post by: GigaWatt on February 03, 2021, 09:13:39 AM
Yeah, you're right, my mistake :P :D. Though that somehow 2.0.18 as a string was related to this, but after some more testing, yes, it's not related ;).

The bug appears only if the title contains more or equal to 25 characters, including < or >. White spaces, strings and other stuff, as I initially though, has nothing to do with the bug.

To reproduce the bug, make a title with 24 characters, include < or > (or both) in any order in the title and the bug appears ;).
Title: Re: 2.0.18 <> bug with greater/less than symbols appearing in board index
Post by: Dzonny on February 03, 2021, 10:35:19 AM
Yeah, indeed in smaller titles it doesn't appear.
Title: Re: 2.0.18 <> bug with greater/less than symbols appearing in board index
Post by: shawnb61 on February 03, 2021, 11:24:14 AM
Bug confirmed...  And confirmed it is actually a different symptom of:
https://www.simplemachines.org/community/index.php?topic=576601.0
Title: Re: 2.0.18 <> bug with greater/less than symbols appearing in board index
Post by: shawnb61 on February 08, 2021, 04:32:56 PM
For those who are impacted by this, the attached patch should help.  It's what I'm using on my site.

This is not an SMF-supported patch.  I am just sharing the fix I am using.  If this is addressed in a future 2.0.x release, this will need to be uninstalled before applying the patch for that release.

Hope this helps,
Title: Re: 2.0.18 <> bug with greater/less than symbols appearing in board index
Post by: spiros on February 09, 2021, 03:30:04 AM
Cor blimey, Shawn, this little bug required a considerably amount of edits. I can confirm it works well on my site.
Title: Re: 2.0.18 <> bug with greater/less than symbols appearing in board index
Post by: dcmouser on August 25, 2021, 05:02:06 AM
Thank you for this fix.
We don't use the patch system since we have customized files that require manual merging.
Is there anyway someone could upload their modified Load.php or else just show me a block of the replaced code so I can more easily merge in the changes?
Title: Re: 2.0.18 <> bug with greater/less than symbols appearing in board index
Post by: Kindred on August 25, 2021, 06:20:12 PM
Just read the instructions in the patch...

Although,  unless you REALLY screwed with the file contents,  the package manager is still the easiest way.

I have used the package manage rwith over 150 mods installed....
Title: Re: 2.0.18 <> bug with greater/less than symbols appearing in board index
Post by: Arantor on August 25, 2021, 06:51:15 PM
Specifically: https://custom.simplemachines.org/index.php?action=parse;update=smf_patch_2.0.18.tar.gz;smf_version=2.0.17

Which is what the package manager will do for you.