Topic "disappears" ...
 
Notifications
Clear all

[Closed] Topic "disappears" when posting specific C source code

11 Posts
4 Users
4 Reactions
967 Views
Posts: 33
Topic starter
(@hansie)
Eminent Member
Joined: 8 years ago

A user posted the attached C source code in a post, with the result that the message will not be shown.
While testing, see the initial post that showed this issue and my test topic, my browser would sometimes even freeze. You can see I've edited this post numerous times in hopes to find where it goes wrong.

I've been cutting and pasting code to see if I could pinpoint it to a specific character combination, but haven't been able to find anything 😞 

I've pasted the code in the attached file (the issue does not seem to happen in this forum).

 example.c

 

wpForo Version 2.2.3

wpForo Ads Manager Version 3.0.3
wpForo Advanced Attachments Version 3.1.2
wpForo Embeds Version 3.0.9

Wordpress 6.4.1
PHP Version: 8.0.30

10 Replies
Posts: 33
Topic starter
(@hansie)
Eminent Member
Joined: 8 years ago

Note that the user placed the code in the message - not as an attachment. Removing the last few lines of the code (roughly as of "} else {" at the end) makes it visible again.

2 Replies
RealAct
(@realact)
Joined: 7 years ago

Reputable Member
Posts: 238

@hansie I hope you found a solution to your issue, but I wanted to say that your forum looks beautiful.

(@hansie)
Joined: 8 years ago

Eminent Member
Posts: 33

@realact Thank you very much for the compliment 😊  (it's all CSS)

I have not yet found a solution unfortunately.

Posts: 992
Moderator
(@martin)
Support Team
Joined: 8 years ago

@hansie,

Posting a code directly in the editor can always affect the topic layout. It'll not case security issue but it may crash the HTML of your forum page. That's way we have added <> code button. In many cases the crashes happen even wuth <> code button. So you can check out the wpForo Syntax Highliter addon: https://gvectors.com/product/wpforo-syntax-highlighter/

 

1 Reply
(@hansie)
Joined: 8 years ago

Eminent Member
Posts: 33

@martin Thank you Martin!

having dealt with this before, even with other forum/editors/comment-posts, I am aware that some character combination can cause issues. In the past I was always able to find what triggers it.

On that note:

1) The "<>" button has been used for this code.
2) Tired posting it here, also using <>, and that works fine.
3) When editing the post, the page every now and then freezes up (Chrome and Opera anyway) - nothing works anymore (button).

Buying yet another addon (I already have a few) is not an option for me at the moment unfortunately 😞 

Posts: 33
Topic starter
(@hansie)
Eminent Member
Joined: 8 years ago

It's actually happening with non-code as well.

From what I can see the DIV is simply empty and not produced by the forum.
However when I edit a post, everything is there and shows correctly.

Here another instance where this happens: link.

This is what the post looks like to viewers:

 

Posts: 33
Topic starter
(@hansie)
Eminent Member
Joined: 8 years ago

And this is what the user sees when they edit their post:

 

Page 1 / 2