Skip to content

fix: encode HTML brackets#100

Merged
bosschaert merged 4 commits intomainfrom
esctg2
Nov 10, 2025
Merged

fix: encode HTML brackets#100
bosschaert merged 4 commits intomainfrom
esctg2

Conversation

@bosschaert
Copy link
Contributor

Description

If the following characters appear in the document text, they are now encoded using &-syntax before sending them to da-admin: < > &

Additionally, if the stored document retrieved contains tags that are not known HTML tags, they are assumed to be text and are converted to the &-escaped syntax on read, to handle pre-existing documents.

Related Issue

Fixes: #73

How Has This Been Tested?

  • New unit tests
  • Locally with da-live and da-admin

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@bosschaert bosschaert marked this pull request as draft November 7, 2025 14:23
@github-actions
Copy link

github-actions bot commented Nov 7, 2025

LCOV of commit 00c230b during Install, lint, and test #246

Summary coverage rate:
  lines......: 99.1% (2010 of 2028 lines)
  functions..: 95.9% (70 of 73 functions)
  branches...: no data found

Files changed coverage rate:
                  |Lines       |Functions  |Branches    
  Filename        |Rate     Num|Rate    Num|Rate     Num
  ======================================================
  src/collab.js   | 4.3%    675| 0.0%    27|    -      0
  src/schema.js   | 4.4%    367| 0.0%    15|    -      0

@bosschaert bosschaert marked this pull request as ready for review November 7, 2025 14:58
@bosschaert bosschaert merged commit 6c5b5fd into main Nov 10, 2025
3 checks passed
@bosschaert bosschaert deleted the esctg2 branch November 10, 2025 08:37
adobe-bot pushed a commit that referenced this pull request Dec 8, 2025
# 1.0.0 (2025-12-08)

### Bug Fixes

* add check for shared secret ([#108](#108)) ([a79731f](a79731f))
* add span to known HTML tags ([#101](#101)) ([fbf016d](fbf016d))
* do not empty document if error ([#90](#90)) ([a406add](a406add))
* encode HTML brackets ([#100](#100)) ([6c5b5fd](6c5b5fd))
* encode HTML brackets ([#74](#74)) ([015163e](015163e))
* keep content if no main found in html ([#85](#85)) ([9fd25ac](9fd25ac))
* null doc crashes aem2doc ([#84](#84)) ([6197114](6197114))
* ommit stacktraces in error map for non-dev ([#110](#110)) ([1f896ac](1f896ac))
* remove html comments ([#68](#68)) ([cf05aae](cf05aae))

### Features

* disable stack traces on production ([#109](#109)) ([79c40bd](79c40bd))
* Prevent implicit document creation via If-Match header ([#105](#105)) ([b33ae65](b33ae65))
adobe-bot pushed a commit that referenced this pull request Dec 8, 2025
# 1.0.0 (2025-12-08)

### Bug Fixes

* add check for shared secret ([#108](#108)) ([a79731f](a79731f))
* add span to known HTML tags ([#101](#101)) ([fbf016d](fbf016d))
* do not empty document if error ([#90](#90)) ([a406add](a406add))
* encode HTML brackets ([#100](#100)) ([6c5b5fd](6c5b5fd))
* encode HTML brackets ([#74](#74)) ([015163e](015163e))
* keep content if no main found in html ([#85](#85)) ([9fd25ac](9fd25ac))
* null doc crashes aem2doc ([#84](#84)) ([6197114](6197114))
* ommit stacktraces in error map for non-dev ([#110](#110)) ([1f896ac](1f896ac))
* remove html comments ([#68](#68)) ([cf05aae](cf05aae))
* trigger release ([ca061d4](ca061d4))

### Features

* disable stack traces on production ([#109](#109)) ([79c40bd](79c40bd))
* Prevent implicit document creation via If-Match header ([#105](#105)) ([b33ae65](b33ae65))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Escape HTML-like characters

2 participants