0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-04 10:39:43 +08:00
A platform for community discussion. Free, open, simple. https://www.discourse.org
  • Ruby 58.5%
  • JavaScript 35.5%
  • HTML 3.1%
  • SCSS 2.8%
Find a file
Renato Atilio bd4375c376
FIX: Unwrap pasted spans in the DOM parse rule
Stripping `lang` at paste time needed a regex over the HTML to avoid
reserializing every paste. It missed a `lang` that followed a quoted attribute
containing `>`, and reserializing the clipboard HTML dropped the `<head>` and
root markers Word detection reads.

The parse rule is the single point every DOM path reaches - a paste, a drop, a
quote - so refusing `lang` there covers them all without touching the string.
A `lang` written in markdown arrives through the token parser and is
unaffected, including while the span is edited in the rich editor.

Only `lang` is refused, rather than the span itself, so an attribute a span may
later be allowed to carry still survives a paste.

Copying a lang span inside the editor and pasting it back now drops the
attribute, which the paste-time version preserved.
2026-07-31 15:56:03 -03:00
.agents DEV: symlink to skills (#38573) 2026-03-18 09:41:56 +11:00
.claude DEV: symlink to skills (#38573) 2026-03-18 09:41:56 +11:00
.cursor/rules
.devcontainer Bump devcontainer image to 20260707-0040 (#41503) 2026-07-07 21:40:22 +10:00
.github DEPS: Bump actions/stale from 10 to 11 (#42123) 2026-07-29 11:41:52 +01:00
.skills FEATURE: Promote Ideas & Events category types to permanent status (#42080) 2026-07-29 09:20:40 +10:00
.vscode DEV: Replace JS build system with Rolldown (#35963) 2026-05-29 11:11:55 +01:00
.zed DEV: add Zed editor configuration (#36958) 2026-01-06 23:30:45 +01:00
app FIX: Race condition allows bypass of data export rate limit in Discourse (#41990) 2026-07-29 13:04:18 -05:00
bin DEV: Lint .mjs and .cjs files locally (#42110) 2026-07-29 16:23:50 -03:00
config DEV: Promote enable_invite_modal_with_roles upcoming change to beta (#42135) 2026-07-29 09:52:00 -07:00
db FEATURE: Support markdown in tag descriptions (#41996) 2026-07-29 14:43:47 +01:00
docs DEV: Preserve existing errors in service model steps (#41896) 2026-07-23 17:15:26 +10:00
frontend FIX: Unwrap pasted spans in the DOM parse rule 2026-07-31 15:56:03 -03:00
images
lib DEV: Derive styleguide code samples from the rendered example (#42100) 2026-07-29 13:48:35 -03:00
log
migrations MT: Add the Markbridge-based MarkdownRenderer 2026-07-22 14:48:17 +02:00
patches DEV: Replace JS build system with Rolldown (#35963) 2026-05-29 11:11:55 +01:00
plugins DEV: Source the remaining styleguide code samples from real modules (#42139) 2026-07-29 15:36:42 -03:00
public FEATURE: Add bulk emoji import/export for admins (#41816) 2026-07-20 15:56:49 -07:00
script DEV: Replace simple subprocesses with Ruby APIs (#42076) 2026-07-28 12:03:07 +08:00
spec FIX: Unwrap pasted spans in the DOM parse rule 2026-07-31 15:56:03 -03:00
stylelint-rules DEV: Enforce :where() for .uc-* upcoming-change classes via stylelint (#41917) 2026-07-22 15:26:59 +01:00
test DEV: Clean up smoke-test (#40066) 2026-05-15 12:28:41 +02:00
themes I18N: Update translations (#42016) 2026-07-28 16:55:49 +02:00
vendor DEV: move discourse gifs to core (#40162) 2026-06-10 11:35:44 +04:00
.annotaterb.yml
.editorconfig
.git-blame-ignore-revs DEV: Add nested module style commit to .git-blame-ignore-revs 2026-03-20 10:08:56 +01:00
.gitattributes
.gitignore DEV: Plugin rename discourse captcha (#39350) 2026-07-21 17:21:39 -05:00
.ignore
.jsdoc
.licensed.yml DEPS: Bump oauth from 1.1.3 to 1.1.5 (#40263) 2026-06-04 01:06:17 +02:00
.licensee.json DEV: Bump vitest and vite (#40450) 2026-06-08 10:29:44 +01:00
.npmrc
.pnpmfile.cjs
.prettierignore DEV: add typescript support for core, themes and plugins (#41478) 2026-07-08 12:57:18 +01:00
.prettierrc.cjs
.rspec
.rspec_parallel
.rubocop.yml DEV: Enable Style/RedundantSelf rubocop rule (#40098) 2026-05-19 19:27:45 +02:00
.ruby-gemset.sample
.streerc
AGENTS.md
AI-AGENTS.md DEV: Update AGENTS.md linting guidance (#42121) 2026-07-29 13:25:30 +08:00
Brewfile
CLAUDE.md
CODEOWNERS DEV: Add Block API for declarative, validated UI extension points (#36810) 2026-02-25 17:36:43 -03:00
config.ru
CONTRIBUTING.md
COPYRIGHT.md
d
discourse.sublime-project
eslint.config.mjs DEV: add typescript support for core, themes and plugins (#41478) 2026-07-08 12:57:18 +01:00
Gemfile FIX: Silent truncation and corruption of AI structured output streams (#41716) 2026-07-15 12:00:24 -03:00
Gemfile.lock DEV: Bump landlock, refactor, and add problem check (#42049) 2026-07-27 13:51:16 +01:00
GEMINI.md
lefthook.yml DEV: Lint .mjs and .cjs files locally (#42110) 2026-07-29 16:23:50 -03:00
LICENSE.txt
package.json DEV: Lint .mjs and .cjs files locally (#42110) 2026-07-29 16:23:50 -03:00
pnpm-lock.yaml DEV: Derive styleguide code samples from the rendered example (#42100) 2026-07-29 13:48:35 -03:00
pnpm-workspace.yaml DEV: Move pnpm config from package.json to pnpm-workspace.yaml (#41991) 2026-07-23 17:54:14 +01:00
Rakefile
README.md DEV: Update copyright year in README (#41712) 2026-07-20 14:21:49 +10:00
stylelint.config.mjs DEV: Enforce :where() for .uc-* upcoming-change classes via stylelint (#41917) 2026-07-22 15:26:59 +01:00
translator.yml DEV: Plugin rename discourse captcha (#39350) 2026-07-21 17:21:39 -05:00
tsconfig-base.json DEV: Add Block API for declarative, validated UI extension points (#36810) 2026-02-25 17:36:43 -03:00
tsconfig.json DEV: Plugin rename discourse captcha (#39350) 2026-07-21 17:21:39 -05:00
versions.json DEV: Use precise dates in versions.json (#42129) 2026-07-29 15:21:42 +01:00

The online home for your community.

github-readme

You can self-host Discourse on your own infrastructure. But if you'd rather skip the setup, maintenance, and server management, we offer official Discourse hosting.

👉 Learn more about Discourse hosting

Discourse is a 100% open-source community platform for those who want complete control over how and where their site is run.

Our platform has been battle-tested for over a decade and continues to evolve to meet users needs for a powerful community platform.

With Discourse, you can:

  • 💬 Create discussion topics to foster meaningful conversations.

  • Connect in real-time with built-in chat.

  • 🎨 Customize your experience with an ever-growing selection of official and community themes.

  • 🤖 Enhance your community with plugins, from chatbots powered by Discourse AI to advanced tools like SQL analysis with the Data Explorer plugin.

To learn more, visit discourse.org and join our support community at meta.discourse.org.

Here are just a few of the incredible communities using Discourse:

discourse-communities

👉 Discover more communities using Discourse

Development

To get your environment set up, follow one of the setup guides:

Before you get started, ensure you have the following minimum versions: Ruby 3.4+, PostgreSQL 15, Redis 7.

For more information, check out the Developer Documentation.

Setting up Discourse

If you want to set up a Discourse forum for production use, see our Discourse Install Guide.

If you're looking for official hosting, see discourse.org/pricing.

Requirements

Discourse supports the latest, stable releases of all major browsers and platforms:

Browsers Tablets Phones
Apple Safari iPadOS iOS
Google Chrome Android Android
Microsoft Edge
Mozilla Firefox

Additionally, we aim to support Safari on iOS 16.4+.

Built With

  • Ruby on Rails — Our back end API is a Rails app. It responds to requests RESTfully in JSON.
  • Ember.js — Our front end is an Ember.js app that communicates with the Rails API.
  • PostgreSQL — Our main data store is in Postgres.
  • Redis — We use Redis as a cache and for transient data.
  • BrowserStack — We use BrowserStack to test on real devices and browsers.

Plus lots of Ruby Gems, a complete list of which is at /main/Gemfile.

Contributing

Build Status

Discourse is 100% free and open source. We encourage and support an active, healthy community that accepts contributions from the public including you!

Before contributing to Discourse:

  1. Please read the complete mission statements on discourse.org. Yes we actually believe this stuff; you should too.
  2. Read and sign the Electronic Discourse Forums Contribution License Agreement.
  3. Dig into CONTRIBUTING.MD, which covers submitting bugs, requesting new features, preparing your code for a pull request, etc.
  4. Always strive to collaborate with mutual respect.
  5. Not sure what to work on? We've got some ideas.

We look forward to seeing your pull requests!

Security

We take security very seriously at Discourse; all our code is 100% open source and peer reviewed. Please read our security guide for an overview of security measures in Discourse, or if you wish to report a security issue.

Security fixes are listed in the release notes for each version.

The Discourse Team

The original Discourse code contributors can be found in AUTHORS.MD. For a complete list of the many individuals that contributed to the design and implementation of Discourse, please refer to the official Discourse blog and GitHub's list of contributors.

Copyright 2014 - 2026 Civilized Discourse Construction Kit, Inc.

Licensed under the GNU General Public License Version 2.0 (or later); you may not use this work except in compliance with the License. You may obtain a copy of the License in the LICENSE file, or at:

https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Discourse logo and “Discourse Forum” ®, Civilized Discourse Construction Kit, Inc.

Accessibility

To guide our ongoing effort to build accessible software we follow the W3Cs Web Content Accessibility Guidelines (WCAG). If you'd like to report an accessibility issue that makes it difficult for you to use Discourse, email accessibility@discourse.org. For more information visit discourse.org/accessibility.

Dedication

Discourse is built with love, Internet style.

For over a decade, our amazing community has helped shape Discourse into what it is today. Your support, feedback, and contributions have been invaluable in making Discourse a powerful and versatile platform.

Were deeply grateful for every feature request, bug report, and discussion that has driven Discourse forward. Thank you for being a part of this journey—we couldnt have done it without you!