microsoft / microsoft/Power-Fx

Escaping HTML strings

Open
#2,167 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
3.4k
Forks
358
Avg merge
10h 34m
Merged PRs (30d)
3

Description

For expressions that evaluate to HTML, can Power Fx help with escaping to prevent injection attacks?

Ie:
$"Hello<b>{name}</b>" --> "Hello<b>" & Escape(name} & "</b>"

We must also have some raw way to inject direct html.
$"Hello<b>{RawHtml(name)}</b>" --> "Hello<b>" & name & "</b>"

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No implementation files or tests are named. Start by locating Power Fx string interpolation and any HTML-output or sanitization paths, then clarify the expected escaping and raw-HTML semantics. Done means the behavior is specified and verified for both escaped values and explicitly raw HTML.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, html
Domain
security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.