Zipstack / unstract

No-code LLM Platform to launch APIs and ETL Pipelines to structure unstructured documents
https://unstract.com
GNU Affero General Public License v3.0
882 stars 54 forks source link

FIX: Removed the usage of escape-html library #295

Closed tahierhussain closed 3 months ago

tahierhussain commented 3 months ago

What

The escape-html library is not needed as react by default escapes HTML.

Resources:

  1. https://www.stackhawk.com/blog/react-xss-guide-examples-and-prevention/
  2. https://legacy.reactjs.org/docs/introducing-jsx.html#jsx-prevents-injection-attacks

-

Why

Removed the escape-html library because that work in handle by react by default.

-

How

Removed the usage from the /src/components/custom-tools/text-viewer-pre/TextViewerPre.jsx component and did npm uninstall to remove the package.

-

Can this PR break any existing features. If yes please list of possible items. If no please exaplin why. (PS: Admins do not merge the PR without this section filled)

No, this PR will not break any existing features. It is a UI change where we render the raw text.

-

Database Migrations

NA

Env Config

NA

Relevant Docs

NA

Related Issues or PRs

NA

Dependencies Versions

NA

Notes on Testing

NA

Screenshots

image

Checklist

I have read and understood the [Contribution Guidelines]().

sonarcloud[bot] commented 3 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud