Files
wekan/docs/Features/Board-Header/Board-Views/Activity-Rendering.md
T
Lauri Ojansivu 9e97f5119d Docs: Board header and board views: what each feature is, how to use it, how its numbers are calculated, how it works, and its commits.
Search now describes the two separate buttons (the shared headerSearchButton
template is gone), the sidebar toggle, stepping through results and what is
searched; Activity rendering names Admin Panel / Settings / Security, where
the security controls moved; Chat view lists only cards with a conversation
and the unread counts; Calendar gets its title and all its dates.

Thanks to xet7 !
2026-11-22 18:06:25 +02:00

5.6 KiB

Activity rendering

What it is

The activity feed lists what happened on a board or a card: a card created, a title changed, a label added, a comment written. This page is about how the values inside those sentences - titles, labels, comments, file names - are drawn. They are rendered as Markdown with emoji, like every other text field in WeKan, and pass through the same HTML sanitizer, so an activity can never show markup that the card itself could not.

Read more

How to use it

See the activities.

  1. Open a card: its activities are under its details. Or open a board's right sidebar: its activities are the board's feed.
  2. Titles, checklist text, labels, custom-field values, comment excerpts, source names and attachment names are shown formatted - bold, links, emoji - as they are on the card.
  3. Click a linked title to go to that card, list or board. When the title holds a link of its own, an arrow (↗) beside it is the way to the card instead.

Change how they are shown (site admin):

  1. Open Admin Panel → Settings → Security.
  2. Tick Always show all code as plain text to show the literal source of every rich text field, activities included - Markdown and HTML as typed.
  3. Tick Render links as plain text to remove clickable links from activity sentences and every other rich text field.
  4. With both off (the default), Markdown, emoji and permitted HTML are rendered after sanitization.

How the numbers are calculated

Activity rendering has no numbers of its own. It has three display modes, set by two switches that are off by default: normal, links as plain text, and all code as plain text.

How it works in WeKan

Opened-card activities and the right sidebar share the same activity template (activities and activity in client/components/activities/activities.jade, included with mode="card", mode="board" and the linked-card and linked-board modes). Activity titles, checklist text, labels, custom-field values, comment excerpts, source names and attachment names use the existing Markdown/emoji viewer: activityValue() in client/components/activities/activities.js returns titleViewerHtml() from client/lib/titleViewer.js. HTML allowed by the existing sanitizer is rendered with the same restrictions as other viewer fields. No new HTML tags or URL schemes are permitted.

The Security controls apply (they were in Admin Panel → Problems until 2026-11-19, and are in Admin Panel → Settings → Security now):

  • Plain-source mode (Always show all code as plain text, alwaysShowCodeAsText) displays literal source, including Markdown and HTML.
  • Render links as plain text (renderLinksAsPlainText) removes clickable links from activity sentences: the messages are sanitized with stripLinks.
  • Normal mode renders Markdown, emoji and permitted HTML after sanitization.

Imported source URLs retain their HTTP/HTTPS check (/^https?:\/\//). When a rich title contains its own link, activity navigation is shown beside it to avoid nested anchors (linkedActivityValue()).

Tests. Focused activity-link, viewer, source-URL and Jade compilation checks pass: tests/activityViewer.test.cjs (both feeds use the shared viewer, rich links keep allowed HTML without nested anchors, malformed script end tags are removed by the real sanitizer, message values are substituted with the real formatter) and tests/activityCardLink.test.cjs. Browser regressions in tests/playwright/specs/activity-viewer.e2e.js cover both feeds, permitted HTML, unsafe event attributes and all three display modes. They were syntax-checked when this page was written; live execution was pending.

Commits