Formatted document pages and a magnifying lens, illustrating editing and search.

oCMS 0.31.0 is available. This release fixes formatting that disappeared when an editor saved a page and makes search match the text visitors read. It also makes sanitizer removals visible, restores draft previews, and adds a configurable status-page link.

Get the current archives and checksums on Download. For an existing installation, read the v0.31 upgrade checks before replacing the binary.

Editor formatting survives a save

With HTML sanitization enabled, previous saves removed inline styles. A page could look right in the editor and lose its alignment, colors or layout after saving. Version 0.31.0 preserves the supported styles written by TinyMCE: text and background colors, font family and size, line height, indentation, underline and strikethrough, and image and table layout. The table border attribute is preserved too.

The allowed styles are checked by element and value. Positioning, URL-based styles, negative margins and out-of-range sizes are still excluded. The editor receives the same allowed-style list as the sanitizer, so its formatting controls and the saved result stay consistent. Links also retain target="_blank", with rel="noopener" added.

When a save or version restore removes unsupported markup, the editor reopens with a warning naming up to five removed items. The Event Log records the removal. Review that warning and the saved preview rather than assuming every pasted style was accepted.

An upgrade cannot recover formatting already removed by an earlier save. Reapply it from an intact source. Keep production HTML sanitization enabled; the editor's guide explains the updated workflow.

Public search previously matched words found only in tags, attributes, classes, inline styles or link URLs. Result excerpts could also expose raw HTML. Version 0.31.0 indexes readable page text and produces plain-text excerpts with matched words highlighted. The same indexing change applies to the MCP search_pages tool.

For example, a paragraph containing <p class="lead">Trail notes</p> contributes its readable words to search. The class name alone should not make that page match a query.

A startup migration creates the new page_search full-text index and queues existing pages. oCMS processes that queue in batches of 100 during searches and in the background. On a large site, the first searches after upgrading can miss pages that have not been indexed yet. No manual index command or SQL is required.

The older pages_fts index is retained for compatibility with an earlier binary. Keep the complete pre-upgrade backup and rehearse recovery as usual; index compatibility is only one part of a rollback plan.

Status links and draft previews

  • Status Page URL: set an absolute HTTP or HTTPS address in /admin/config. The built-in Default, Developer and Starter themes show a footer link, and the admin header adds a status icon beside View site. An empty setting hides the link. Custom themes can render .StatusPageURL; existing custom footers need explicit support. See the configuration guide.
  • Draft previews: draft titles in Admin → Pages and the editor's Preview button open the saved draft again. Administrators and editors can view it; anonymous visitors still receive 404.
  • Search labels: Post results retain their type so themes can distinguish them from Pages.

Before upgrading

  1. Back up the database, uploads, custom files and configuration with the matching installed binary. Preserve the existing session and MFA keys.
  2. Verify the release archive's checksum and rehearse the update against a restored copy. Use the complete upgrade walkthrough.
  3. Save a disposable draft with the formatting, images, tables and links your editors use. Reopen it, check any removal warning, and inspect the preview.
  4. Search for text in a known published page. Allow the background indexing queue to progress before treating an older page as missing.
  5. Check authenticated draft previews, anonymous access, search result labels and any configured status link before reopening normal writes.

This release also includes HTML-parser security fixes affecting Markdown conversion. The Privacy module uses vendored upstream Klaro assets without changing consent behavior, and GitHub releases now have descriptive titles and cleaner paragraph formatting.

Read the complete v0.31.0 release notes for all changes. The local release history links this update to earlier releases and their upgrade requirements.

Source: https://ocms.tech/ocms-0-31-editor-formatting-better-search

Written by OIV