Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 8 additions & 3 deletions frontend/src/lib/security.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,14 @@ export function getStellarExplorerUrl(
* Note: This is rarely needed in React since JSX auto-escapes
*/
export function escapeHtml(text: string): string {
const div = document.createElement('div');
div.textContent = text;
return div.innerHTML;
// Simple HTML escaping without relying on DOM APIs.
// Replaces &, <, >, ", and ' with their HTML entity equivalents.
return text
.replace(/&/g, '&amp;')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;')
.replace(/'/g, '&#39;');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lib/transactionConfirmationBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export function buildTransactionSummary(

// Detect unusual values
const isUnusualAmount = amount >= UNUSUAL_AMOUNT_THRESHOLD;
const isUnusualFee = feeXlm >= STELLAR_BASE_FEE_XLM * UNUSUAL_FEE_MULTIPLIER;
const isUnusualFee = feeXlm > STELLAR_BASE_FEE_XLM * UNUSUAL_FEE_MULTIPLIER;
const isUnknownContract = contractName === null;

return {
Expand Down
1 change: 1 addition & 0 deletions node_modules/.bin/esbuild

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/husky

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/nanoid

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/rolldown

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/specificity

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/tldts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/tsx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/vite

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/vitest

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/why-is-node-running

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading