Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [bbcode]

BBCode (short for Bulletin Board Code) is a markup language commonly used by forum software.

2
votes
0answers
58 views

Is the PHP BB code extension safe against XSS?

Bad home brew implementations of BB code (especially in PHP) are a common source of XSS vulnerabilities. Usually they rely on a bunch of regexes, a tool that is not fit for the job. But lo and ...
0
votes
0answers
77 views

Custom BBCode preg_replace exploit (patch help needed)

I am having an issue where people are able to exploit my custom BBCode. I am unsure how to patch this up, and was hoping someone here would help me. In the code below, there is a lot more BBCode in ...
0
votes
0answers
121 views

Securely interpret BBCode-tags in PHP

I'm trying to make a kind of administratorpanel for my website, so I could e.g easily add news articles to my website. The problem is that the administrators should be able to use a kind of BBCode, ...
1
vote
1answer
497 views

How to create a secure BBCode?

Right now, people can use XSS in my URL BBCode, and I don't know how to fix it. I had attempted to fix it a while ago, but someone some how bypassed it! function filterScript($content) { $...
1
vote
1answer
767 views

Using htmlentities() in a BBCode-supporting textarea to stop XSS

I want to have a text area to post stuff to the database with BBCode. So, I downloaded a JavaScript code (to write in the specific BBCode when the image is clicked) but it didn't transform the text. ...
3
votes
2answers
2k views

Breaking out of attribute in double quotes

I have a piece of code that allows for [url]someurl[/url] BB-Code and replaces it with <a href="someurl">someurl</a> It takes two precautions to prevent XSS. It replaces <, > ...