Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename Str2html to SanitizeHTML and clarify its behavior #29516

Merged
merged 2 commits into from
Mar 1, 2024

Conversation

wxiaoguang
Copy link
Contributor

@wxiaoguang wxiaoguang commented Mar 1, 2024

Str2html was abused a lot. So use a proper name for it: SanitizeHTML

And add some tests to show its behavior.

@wxiaoguang wxiaoguang added the type/refactoring Existing code has been cleaned up. There should be no new functionality. label Mar 1, 2024
@wxiaoguang wxiaoguang added this to the 1.22.0 milestone Mar 1, 2024
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 1, 2024
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 1, 2024
@wxiaoguang
Copy link
Contributor Author

I will update a summary PR after the refactoring completes:

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Mar 1, 2024
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Mar 1, 2024
@wxiaoguang wxiaoguang enabled auto-merge (squash) March 1, 2024 09:52
@wxiaoguang wxiaoguang merged commit fb42972 into go-gitea:main Mar 1, 2024
26 checks passed
@wxiaoguang wxiaoguang deleted the refactor-str2html-more branch March 1, 2024 10:22
zjjhot added a commit to zjjhot/gitea that referenced this pull request Mar 1, 2024
* giteaofficial/main:
  Set pre-step status to `skipped` if job is skipped (go-gitea#29489)
  Use a predictiable fork URL to allow forking repositories without providing a repo ID (go-gitea#29519)
  Adding back missing options to app.example.ini (go-gitea#29511)
  Refactor the "attachments" sub-template data key to RenderedContent (go-gitea#29517)
  Rename Str2html to SanitizeHTML and clarify its behavior (go-gitea#29516)
  Add admin API route for managing user's badges (go-gitea#23106)
  Refactor some Str2html code (go-gitea#29397)
  Move migration functions to services layer (go-gitea#29497)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/docs size/M Denotes a PR that changes 30-99 lines, ignoring generated files. type/refactoring Existing code has been cleaned up. There should be no new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants