---
title: Using BBCode in forum posts
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

[Bulletin Board code](http://en.wikipedia.org/wiki/BBCode) (BBCode) is a lightweight markup language designed to let users format text of their messages. It is used in many forums on the web, not just on websites created with Kentico. Its tags are similar to HTML tags, and are entered in square brackets.

Users can use BBCode in their forum posts only if it is enabled. You have to allow the use of BBCode when editing a forum or forum group in the **Forums** application, on the **General** tab in the **Editor settings** section.

## URLs in BBCode

All URLs in macros (URL, IMG) are validated as URLs to avoid [XSS](https://docs.kentico.com/k81/securing-websites/developing-secure-websites/cross-site-scripting-xss.md), and resolved into their absolute URL equivalents. The following URL formats can be used:

- [www.google.com](http://www.google.com) – URL starting with _www._
- <http://devnet.kentico.com> – URL starting with protocol
- \~/CMSDesk/default.aspx – virtual path
- ../default.aspx – relative URLs
- /Kentico/default.aspx – server relative URL

## API for BBcode

You can resolve BBCode in the ASPX or codebehind code. To resolve all BBcode macros in a string, use the following method:

```csharp

string CMS.Helpers.DiscussionMacroHelper.ResolveDiscussionMacros(string inputText)

```

Alternatively, you can use the `CMS.Helpers.DiscussionMacroHelper` class to resolve macros with particular settings using the `ResolveMacros` method.
