Forum Index > Bug Reporting > HTML/CSS works in forum previews but not...
Page 1
Author
Thread Post
UntitledPrince
Level 75
Master Sylestiologist
Joined: 9/23/2021
Threads: 161
Posts: 2,227
Posted: 10/9/2021 at 3:07 AM
Post #1
What the title says, basically. HTML/CSS code looks great when previewing a forum post, but once I actually post it, it just shows the code I've written. For example: https://www.sylestia.com/forums/?thread=100134
When previewing, it looks like this:
Normally, I just use the markup language built into Sylestia (which is what I used here to make the image work), but HTML/CSS is so much more powerful, so I'm hoping this is fixable.
Aphelion
Level 75
Serene Storyteller
Joined: 5/14/2016
Threads: 119
Posts: 9,888
Posted: 10/9/2021 at 3:55 AM
Post #2
The forums don't support HTML/CSS; all text when post is taken as a string (I think) and is sanitised before being made into a visible post on the forum. This is most likely for security reasons since js and other stuff can be injected with HTML.
(I found out when I tried to use <marquee> once. Don't ask why. Younger me was a menace.)
Edit: After looking at your HTML, I think you're trying to direct people who click on the images to corresponding pet pages? You can use the built in [.img=your url here]image url here[./img]
Edited By Aphelion on 10/9/2021 at 4:01 AM.
UntitledPrince
Level 75
Master Sylestiologist
Joined: 9/23/2021
Threads: 161
Posts: 2,227
Posted: 10/9/2021 at 4:05 AM
Post #3
Hm, then why does it look like it's working in the preview? If it's just going to show the code as is, that should be what shows in the preview too, shouldn't it?
Also, I know at least some HTML/CSS works because I copied an imgur embed link once by mistake instead of the regular link, and it worked.
Yeah, I know how to do what I've done in that post with the built in Sylestia markup language, but I was just starting out with that as the skeleton of the post, and then I was going to do some fun formatting stuff with it that the regular Sylestia language refuses to do, so that's why I'd rather be able to do it in HTML/CSS.
Edited By UntitledPrince on 10/9/2021 at 4:06 AM.
Aphelion
Level 75
Serene Storyteller
Joined: 5/14/2016
Threads: 119
Posts: 9,888
Posted: 10/9/2021 at 4:12 AM
Post #4
Maybe the preview allows the client's browser to parse and run HTML. What is definitely sure is that whatever you have in the text box goes through a text sanitiser before it is posted - that's why some unicode characters show up in preview but are removed after posting (e.g. smart quotes).
Then again, I don't know how the site works exactly because I'm just a user like you. Krin would know for sure.
And I totally agree with you that HTML support would be nice. Forum posts would look very different if it were the case - there are definitely people familiar with HTML around here. Alas, tradeoffs must be made, probably in the interest of security.
Edited By Aphelion on 10/9/2021 at 4:13 AM.
Krinadon
Level 75
Shadow of the Moon
Site Administrator
Joined: 12/17/2012
Threads: 1,242
Posts: 15,406
Posted: 10/9/2021 at 11:37 AM
Post #5
As was pointed out above - in order to stylize your posts on the Forums you will have to use our built in tools.
Regarding why it seems to display during the preview, but not once fully posted, there must be some sort of discrepancy where the preview is missing a sanitization script that the actual post runs. I will try and look into this when I have time to get the preview to match the final post.
UntitledPrince
Level 75
Master Sylestiologist
Joined: 9/23/2021
Threads: 161
Posts: 2,227
Posted: 10/9/2021 at 5:47 PM
Post #6
Okay. Thanks for getting back to me about it.
Edited By UntitledPrince on 10/9/2021 at 5:47 PM.
Confirm Action
Are you sure you wish to delete this post?
Confirm Action
Are you sure you wish to restore this post?
Confirm Action
Are you sure you wish to report this post?
Go to Top
This Page loaded in 0.009 seconds.
Terms of Service | Privacy Policy | Contact Us | Credits | Job Opportunities