Skip to content

fix(votes): decodifica entità HTML in label/title/description#70

Merged
aborruso merged 1 commit into
mainfrom
fix/votes-html-decode
Jul 19, 2026
Merged

fix(votes): decodifica entità HTML in label/title/description#70
aborruso merged 1 commit into
mainfrom
fix/votes-html-decode

Conversation

@aborruso

Copy link
Copy Markdown
Member

Summary

  • votes list (Camera) restituiva apostrofi come ' invece di ' in label/title/description
  • causa: votes.ts era l'unico tool a non applicare l'helper decodeHtml già esistente e usato da bills.ts, bill-progress.ts, member-bills.ts, ecc.
  • rilevato dall'agente news-driven-cli-gap-analyzer testando votes list contro notizie reali (Cura Italia 2020, bilancio 2026)

Test plan

  • npm run build
  • verifica manuale: node dist/cli.js votes list --date-from 2020-04-23 --date-to 2020-04-24 --legislature 18all'emergenza corretto
  • npm test -- --run: 172/174 passano; i 2 fallimenti sono su senato-votes (403 dall'endpoint Senato live, non collegati a questa modifica che tocca solo il tool Camera)

🤖 Generated with Claude Code

description Camera arrivava con ' invece di apostrofo: votes.ts
era l'unico tool a non applicare l'helper decodeHtml già esistente.
Copilot AI review requested due to automatic review settings July 19, 2026 06:24
@greptile-apps

greptile-apps Bot commented Jul 19, 2026

Copy link
Copy Markdown

Greptile Summary

This PR decodes HTML entities in Camera vote text output. The main changes are:

  • Adds the existing decodeHtml helper to votes.ts.
  • Decodes label, title, and description fields during row mapping.
  • Leaves boolean coercion and derived vote fields unchanged.

Important Files Changed

Filename Overview
src/tools/votes.ts Applies existing HTML entity decoding to vote text fields without changing the rest of the row mapping flow.

Reviews (1): Last reviewed commit: "fix(votes): decodifica entità HTML in la..." | Re-trigger Greptile

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Questo PR allinea il tool votes (Camera) al resto della codebase applicando l’helper condiviso decodeHtml per ripulire/decodificare testo proveniente dall’endpoint LOD, evitando output con entità HTML doppio-escapate in label/title/description.

Changes:

  • Import di decodeHtml in src/tools/votes.ts.
  • Decodifica selettiva dei campi testuali (label, title, description) durante la normalizzazione delle righe risultanti.

@aborruso
aborruso merged commit 65c71a2 into main Jul 19, 2026
3 checks passed
@aborruso
aborruso deleted the fix/votes-html-decode branch July 19, 2026 06:27
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