Verified Solution

[gitlab-org/gitlab] Manual confirmation text shows HTML entities for single quotes when triggered from pipeline overview

Sponsored Content
### ROOT CAUSE The issue occurs because the manual confirmation message is being escaped (converted to HTML entities) when displayed in the pipeline overview. This escaping converts single quotes (`'`) to `'`, causing the inconsistency in rendering. The escaping is likely applied in the JavaScript code that renders the confirmation dialog in the pipeline overview, while it might not be applied (or applied differently) in other entry points like the job details page. ### CODE FIX To fix this issue, we need to ensure that the manual confirmation message is displayed without escaping single quotes in the pipeline overview. This can be achieved by modifying the JavaScript code that builds the confirmation dialog in the pipeline overview to use a custom escaping function that only escapes necessary characters (like `<`, `>`, and `&`) but leaves single quotes unescaped. Here's the fix: ```javascript // In the code that builds the manual confirmation dialog in the pipeline overview // Replace the existing escaping function with a custom one that leaves single quotes unescaped // Original code (likely causing the issue): // const escapedMessage = escapeHtml(manualConfirmation); // Custom escaping function that only escapes necessary characters function escapeHtmlForManualConfirmation(unsafe) { // Escape only necessary characters: &, <, > return unsafe .replace(/&/g, "&") .replace(//g, ">") // Do not escape single quotes // .replace(/'/g, "'") // Remove this line if present } // Use the custom escaping function const escapedMessage = escapeHtmlForManualConfirmation(manualConfirmation); ``` This fix ensures that single quotes are not converted to entities, providing consistent rendering across all entry points. Apply this change to the relevant JavaScript file in the GitLab codebase (likely `app/assets/javascripts/gitlab/components/manual_job/confirm/index.js` or a similar location).
Deploy on DigitalOcean ($200 Credit)

Related Fixes

[golang/go] testing: tests killed with "signal: killed" on go1.26.1 (regression from go1.25.7)
[StackOverflow/docker] Can´t setup devcontainers on vscode
[golang/go] x/tools/gopls: hover: more informative description of embedded methods