Skip to content

fix(docker): preserve WebUI label values on 7.4 - #2866

Merged
tom mortensen (limetech) merged 1 commit into
unraid:masterfrom
SimonFair:fix/docker-webui-labels-74
Dec 4, 2026
Merged

tom mortensen (limetech) merged 1 commit into
unraid:masterfrom
SimonFair:fix/docker-webui-labels-74

Conversation

@SimonFair

@SimonFair SimonFair commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Docker WebUI and Tailscale WebUI menu actions now preserve configured label values containing quotes, entities, line breaks or other punctuation. The values are encoded as JavaScript strings and then for the enclosing HTML attribute. Labels remain undecoded until the existing menu action receives them.

The existing plain-text Tailscale tooltip behavior is retained, including line breaks; malformed UTF-8 uses replacement characters. Existing URL handling and placeholders are unchanged.

Validation: six local Chromium fixture cases passed using the product PHP output expressions, Docker menu JavaScript, jQuery, context menu and tooltip components. Checks verified exact values passed to menu actions, literal tooltip text and no elements created from label contents. Desktop and narrow fixture captures were inspected. PHP syntax and diff checks passed. These fixtures do not qualify a running Docker appliance or full container workflow; published-preview QA remains pending.

Tracks OS-1048 (7.4), child of OS-1047. Related 7.3 implementation: #2853 (OS-1049). This is a separate 7.4 implementation on master, preserving that line's existing tooltip behavior.

Summary by CodeRabbit

  • Bug Fixes
    • Container menu links now handle special characters more reliably, helping prevent malformed links.
    • Tailscale status tooltips now display more reliably when their content includes invalid text characters.

@github-actions

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown

🔧 PR Test Plugin Available

A test plugin has been generated for this PR that includes the modified files.

Version: 2026.12.04.0829
Build: View Workflow Run

📥 Installation Instructions:

Install via Unraid Web UI:

  1. Go to Plugins → Install Plugin
  2. Copy and paste this URL:
https://preview.dl.unraid.net/pr-plugins/pr-2866/webgui-pr-2866.plg
  1. Click Install

Alternative: Direct Download

⚠️ Important Notes:

  • Testing only: This plugin is for testing PR changes
  • Backup included: Original files are automatically backed up
  • Easy removal: Files are restored when plugin is removed
  • Conflicts: Remove this plugin before installing production updates
  • Post-merge behavior: This preview stays available after merge until preview storage expires or it is manually cleaned up

📝 Modified Files:

Click to expand file list
emhttp/plugins/dynamix.docker.manager/include/DockerContainers.php

🔄 To Remove:

Navigate to Plugins → Installed Plugins and remove webgui-pr-2866, or run:

plugin remove webgui-pr-2866

🤖 This comment is automatically generated and will be updated with each new push to this PR.

@coderabbitai

coderabbitai Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The changes update how Docker context-menu URL values are encoded and escaped. They also update Tailscale status tooltip escaping to substitute invalid UTF-8 sequences.

Changes

Output escaping

Layer / File(s) Summary
Escape context-menu and tooltip values
emhttp/plugins/dynamix.docker.manager/include/DockerContainers.php
Context-menu URL values are JSON-encoded and HTML-escaped before they are passed to the handler. Other menu arguments remain unchanged. Tailscale status tooltip escaping adds ENT_SUBSTITUTE.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: ich777, bergware

Merge Risk: Minimal · up to 613d2

This change preserves Docker and Tailscale WebUI label values containing quotes, entities and line breaks when they are passed to the menu action. No concrete regression was found, and URL handling looks unchanged for supported sources. It is low-risk to merge, with the author's pending preview QA as the remaining check.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: preserving WebUI label values for Docker container menu actions on the 7.4 branch. The raw summary shows the url and TSurl values are now JSON-encoded and HTML-escaped…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: preserving WebUI label values for Docker container menu actions on the 7.4 branch. The raw summary shows the url and TSurl values are now JSON-encoded and HTML-escaped before insertion into the menu handler, which matches the title's subject. The title does not mention the Tailscale tooltip UTF-8 change, but that is a secondary part of the change and the title does not need to cover every detail.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

A rabbit checks each URL with care,
And packs its JSON neat and fair.
The tooltip swaps bad bytes away,
So escaped text can safely stay.
Then hops along into the day.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5c04c39a-bb99-4a47-a429-a014ac5ec19a
Commits

Reviewing files that changed from the base of the PR and between 6ed0562 and 613d2fb.

Files selected for processing: 1

  • emhttp/plugins/dynamix.docker.manager/include/DockerContainers.php

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.

@SimonFair
SimonFair marked this pull request as ready for review December 4, 2026 08:39
@unraid-bot Unraid Bot (unraid-bot) added QA Passed QA passed (auto-managed by notification-worker) 7.4.2 Approved for release 7.4.2 (auto-managed by notification-worker) labels Dec 4, 2026
@limetech
tom mortensen (limetech) merged commit 9e1a312 into unraid:master Dec 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

7.4.2 Approved for release 7.4.2 (auto-managed by notification-worker) QA Passed QA passed (auto-managed by notification-worker)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants