Skip to content

[Enhancement]: Use IHtmlString in more places #6571

@bdukes

Description

@bdukes

Is there an existing issue for this?

  • I have searched the existing issues

Description of problem

It is difficult to use the safer <%: someValue %> code insertion syntax (aka bee stings), rather than <%= someValue %> that is primarily used currently, because DNN does not provide an easy way to get HTML content wrapped as an IHtmlString value.

Description of solution

I would like to deprecate LocalizeString and LocalizeSafeJsString from PortalModuleBase and replace them with new helpers string LocalizeText, IHtmlString LocalizeHtml, and IHtmlString LocalizeJsString.

Description of alternatives considered

  • Create a new IHtmlString implementation which is returned from LocalizeText as well.
  • Don't deprecated existing methods, just add more (in this case LocalizeText is not needed)

Anything else?

No response

Do you be plan to contribute code for this enhancement?

  • Yes

Would you be interested in sponsoring this enhancement?

  • Yes

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions