Skip to content

Update from main#1314

Merged
cheeaun merged 77 commits intoproductionfrom
main
Nov 8, 2025
Merged

Update from main#1314
cheeaun merged 77 commits intoproductionfrom
main

Conversation

@github-actions
Copy link
Contributor

This is an automated pull request to update from branch main

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Oct 13, 2025

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
phanpy d83405a Commit Preview URL

Branch Preview URL
Nov 08 2025, 04:17 PM

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Oct 13, 2025

Deploying phanpy with  Cloudflare Pages  Cloudflare Pages

Latest commit: d83405a
Status: ✅  Deploy successful!
Preview URL: https://c579a7b7.phanpy.pages.dev
Branch Preview URL: https://main.phanpy.pages.dev

View logs

cheeaun and others added 16 commits October 13, 2025 02:34
…r-FR,gl-ES,he-IL,it-IT,ja-JP,kab,ko-KR,lt-LT,nb-NO,nl-NL,oc-FR,pl-PL,pt-BR,pt-PT,ru-RU,th-TH,tok,tr-TR,uk-UA,zh-CN,zh-TW) (#1315)

* New translations (Finnish)

* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Catalan)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Hebrew)

* New translations (Italian)

* New translations (Japanese)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Polish)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Turkish)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Esperanto)

* New translations (Norwegian Bokmal)

* New translations (Occitan)

* New translations (Kabyle)

* New translations (Toki Pona)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
giframe depends on canvas which runs node-gyp. That's redundant.
* New translations (Russian)

* Update catalogs.json

* New translations (Chinese Simplified)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* New translations (Catalan)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* New translations (Galician)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…r-FR,gl-ES,he-IL,it-IT,ja-JP,kab,ko-KR,lt-LT,nb-NO,nl-NL,oc-FR,pl-PL,pt-BR,pt-PT,ru-RU,th-TH,tok,tr-TR,uk-UA,zh-CN,zh-TW) (#1321)

* New translations (Finnish)

* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Catalan)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Hebrew)

* New translations (Italian)

* New translations (Japanese)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Polish)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Turkish)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Esperanto)

* New translations (Norwegian Bokmal)

* New translations (Occitan)

* New translations (Kabyle)

* New translations (Toki Pona)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
if (!hasChildren) link.innerHTML = `#<span>${text.slice(1)}</span>`;
const hashSymbol = text[0]; // Preserve the original # or #
if (!hasChildren)
link.innerHTML = `${hashSymbol}<span>${text.slice(1)}</span>`;

Check failure

Code scanning / CodeQL

DOM text reinterpreted as HTML High

DOM text
is reinterpreted as HTML without escaping meta-characters.

Copilot Autofix

AI 4 months ago

To fix the problem, ensure that any text interpolated into an HTML string is sufficiently escaped for HTML meta-characters to prevent breaking out of expected markup and injecting script or tags. The most targeted fix is to run escapeHTML() (already imported at line 2) on the interpolated portion, specifically text.slice(1), before interpolating it into the string assigned to link.innerHTML on line 102.

Make the following change in src/utils/enhance-content.js:

  • On line 102, change:
    link.innerHTML = `${hashSymbol}<span>${text.slice(1)}</span>`;
    to:
    link.innerHTML = `${hashSymbol}<span>${escapeHTML(text.slice(1))}</span>`;

This will ensure any meta-characters in the untrusted portion (text.slice(1)) are safely escaped, preventing XSS via hashtag content.

No new imports/methods are needed since escapeHTML is already imported.


Suggested changeset 1
src/utils/enhance-content.js

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/src/utils/enhance-content.js b/src/utils/enhance-content.js
--- a/src/utils/enhance-content.js
+++ b/src/utils/enhance-content.js
@@ -99,7 +99,7 @@
       if (HASHTAG_REGEX.test(text)) {
         const hashSymbol = text[0]; // Preserve the original # or #
         if (!hasChildren)
-          link.innerHTML = `${hashSymbol}<span>${text.slice(1)}</span>`;
+          link.innerHTML = `${hashSymbol}<span>${escapeHTML(text.slice(1))}</span>`;
         link.classList.add('mention', 'hashtag');
       }
     }
EOF
@@ -99,7 +99,7 @@
if (HASHTAG_REGEX.test(text)) {
const hashSymbol = text[0]; // Preserve the original # or #
if (!hasChildren)
link.innerHTML = `${hashSymbol}<span>${text.slice(1)}</span>`;
link.innerHTML = `${hashSymbol}<span>${escapeHTML(text.slice(1))}</span>`;
link.classList.add('mention', 'hashtag');
}
}
Copilot is powered by AI and may make mistakes. Always verify output.
Unable to commit as this autofix suggestion is now outdated
cheeaun and others added 26 commits October 28, 2025 20:21
…r-FR,gl-ES,he-IL,it-IT,ja-JP,kab,ko-KR,lt-LT,nb-NO,nl-NL,oc-FR,pl-PL,pt-BR,pt-PT,ru-RU,th-TH,tok,tr-TR,uk-UA,zh-CN,zh-TW) (#1325)

* New translations (Galician)

* New translations (Finnish)

* New translations (Catalan)

* New translations (Italian)

* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Hebrew)

* New translations (Japanese)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Polish)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Turkish)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Esperanto)

* New translations (Norwegian Bokmal)

* New translations (Occitan)

* New translations (Kabyle)

* New translations (Toki Pona)

* Update catalogs.json

* New translations (Finnish)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
blocked_domain, blocked_account and muted_account
…I,fr-FR,gl-ES,he-IL,it-IT,ja-JP,kab,ko-KR,lt-LT,nb-NO,nl-NL,oc-FR,pl-PL,pt-BR,pt-PT,ru-RU,th-TH,tok,tr-TR,uk-UA,zh-CN,zh-TW) (#1326)

* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Catalan)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Finnish)

* New translations (Hebrew)

* New translations (Italian)

* New translations (Japanese)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Polish)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Turkish)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Esperanto)

* New translations (Norwegian Bokmal)

* New translations (Occitan)

* New translations (Kabyle)

* New translations (Toki Pona)
* Update catalogs.json

* New translations (Galician)

* New translations (Finnish)

* New translations (Chinese Simplified)

* Update catalogs.json

* New translations (Spanish)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* New translations (Russian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* New translations (Polish)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* New translations (Catalan)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* New translations (Catalan)

* New translations (Italian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…I,fr-FR,gl-ES,he-IL,it-IT,ja-JP,kab,ko-KR,lt-LT,nb-NO,nl-NL,oc-FR,pl-PL,pt-BR,pt-PT,ru-RU,th-TH,tok,tr-TR,uk-UA,zh-CN,zh-TW) (#1335)

* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Catalan)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Finnish)

* New translations (Hebrew)

* New translations (Italian)

* New translations (Japanese)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Polish)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Turkish)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Esperanto)

* New translations (Norwegian Bokmal)

* New translations (Occitan)

* New translations (Kabyle)

* New translations (Toki Pona)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@cheeaun cheeaun merged commit 7d7cb91 into production Nov 8, 2025
10 checks passed
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.

2 participants