HTML-encode TagHelper titles and texts for security#24488
Merged
gizemmutukurt merged 6 commits intorel-10.0from Jan 5, 2026
Merged
HTML-encode TagHelper titles and texts for security#24488gizemmutukurt merged 6 commits intorel-10.0from
gizemmutukurt merged 6 commits intorel-10.0from
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enhances security by implementing HTML encoding for user-provided text content in TagHelper services across the ABP Framework. The changes prevent potential XSS vulnerabilities by ensuring all titles, texts, and captions rendered in HTML are properly encoded before being inserted into the DOM.
- Injected
HtmlEncoderinto TagHelper service constructors throughout the framework - Applied HTML encoding to all user-controlled text content (titles, captions, button text, etc.) before rendering
- Maintained consistent implementation patterns across related TagHelper services
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| AbpTagHelperStyleService.cs | Added HtmlEncoder parameter to constructor and passed it to base class |
| AbpTagHelperScriptService.cs | Added HtmlEncoder parameter to constructor and passed it to base class |
| AbpTabTagHelperService.cs | Added HtmlEncoder injection and applied encoding to tab titles |
| AbpTabLinkTagHelperService.cs | Added HtmlEncoder injection and applied encoding to tab link titles |
| AbpTabDropdownTagHelperService.cs | Added HtmlEncoder injection and applied encoding to dropdown titles |
| AbpModalHeaderTagHelperService.cs | Added HtmlEncoder injection and applied encoding to modal header titles |
| AbpRadioInputTagHelperService.cs | Added HtmlEncoder injection and applied encoding to radio button labels |
| AbpAccordionItemTagHelperService.cs | Added HtmlEncoder injection and applied encoding to accordion item titles |
| AbpCarouselItemTagHelperService.cs | Applied encoding to carousel captions and titles (encoder already present) |
| AbpCardBodyTagHelperService.cs | Added HtmlEncoder injection and applied encoding to card titles and subtitles |
| AbpLinkButtonTagHelperService.cs | Updated constructor to pass HtmlEncoder to base class |
| AbpButtonTagHelperServiceBase.cs | Added HtmlEncoder injection and applied encoding to button text |
| AbpButtonTagHelperService.cs | Updated constructor to pass HtmlEncoder to base class and accept it as parameter |
| AbpBreadcrumbItemTagHelperService.cs | Applied encoding to breadcrumb item titles (encoder already present) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...rk/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpRadioInputTagHelperService.cs
Outdated
Show resolved
Hide resolved
…Form/AbpRadioInputTagHelperService.cs Co-authored-by: Copilot <[email protected]>
salihozkara
approved these changes
Dec 29, 2025
gizemmutukurt
requested changes
Jan 2, 2026
Member
Author
|
Can you share some screenshots or gif? |
gizemmutukurt
approved these changes
Jan 5, 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.
No description provided.