Support valueless HTML attributes in rendered markup#2
Draft
maxpertici with Copilot wants to merge 3 commits into
Draft
Support valueless HTML attributes in rendered markup#2maxpertici with Copilot wants to merge 3 commits into
maxpertici with Copilot wants to merge 3 commits into
Conversation
Agent-Logs-Url: https://github.com/maxpertici/markup/sessions/33d47551-a128-48fb-ba92-0103db3992c5 Co-authored-by: maxpertici <48124450+maxpertici@users.noreply.github.com>
Agent-Logs-Url: https://github.com/maxpertici/markup/sessions/33d47551-a128-48fb-ba92-0103db3992c5 Co-authored-by: maxpertici <48124450+maxpertici@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix issue with outputting HTML attribute without value
Support valueless HTML attributes in rendered markup
May 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rendering currently requires
key="value"for every attribute, which prevents valid HTML boolean/valueless attributes likerequired. This update allows emitting attributes without values while preserving safe attribute rendering.Attribute rendering behavior
Markup::wrapperOpenerTag():''(empty string) now renders as a valueless attribute (required)key="value"Output safety
htmlspecialchars(..., ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8')before interpolation.Docs
setAttribute('required', '')example indocs/markup.mdto document boolean/valueless attribute usage.