Skip to content

[#73511] Fix robots meta tag rendered as text instead of HTML element#22559

Open
wielinde wants to merge 1 commit intorelease/17.3from
bug/73511-wiki-robots-meta-tag
Open

[#73511] Fix robots meta tag rendered as text instead of HTML element#22559
wielinde wants to merge 1 commit intorelease/17.3from
bug/73511-wiki-robots-meta-tag

Conversation

@wielinde
Copy link
Copy Markdown
Member

@wielinde wielinde commented Mar 27, 2026

Summary

Fixes a bug where the ROBOTS meta tag was rendered as visible text on the wiki page when no wiki pages exist yet in a project.

  • Replaces content_tag(:meta, name:, content:) with tag(:meta, ...)content_tag treated the keyword arguments as text content rather than HTML attributes
  • Adds a view spec assertion to cover the correct rendering

Work package

https://community.openproject.org/projects/openproject/work_packages/73511/activity

Test plan

  • Navigate to /projects/<id>/wiki on a project with no wiki pages — no JSON-like text should appear at the top of the page

`content_tag(:meta, name:, content:)` treated the keyword arguments as
text content rather than HTML attributes, producing visible JSON-like
output on the page. Replace with `tag(:meta, ...)` which correctly
renders a self-closing element with the proper attributes.

Adds a view spec assertion to cover the rendered output.
@wielinde wielinde requested a review from oliverguenther March 27, 2026 16:38
@wielinde
Copy link
Copy Markdown
Member Author

@oliverguenther about a week ago you removed a lot of html_safe and I believe that this broke this little case here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant