Skip to content

Fixes incorrect escaping of apostrophes and accents#610

Open
Herafia wants to merge 3 commits intomainfrom
fix/incorrect-escaping-apostrophes
Open

Fixes incorrect escaping of apostrophes and accents#610
Herafia wants to merge 3 commits intomainfrom
fix/incorrect-escaping-apostrophes

Conversation

@Herafia
Copy link
Copy Markdown
Contributor

@Herafia Herafia commented Apr 21, 2026

Checklist before requesting a review

Please delete options that are not relevant.

  • I have performed a self-review of my code.
  • I have added tests (when available) that prove my fix is effective or that my feature works.
  • I have updated the CHANGELOG with a short functional description of the fix or new feature.
  • This change requires a documentation update.

Description

  • It fixes !43258
  • Fixes incorrect escaping of apostrophes and accents (e.g., "d\'achat" → "d'achat") when processing CSV headers.

Screenshots (if appropriate):

image image

@Herafia Herafia requested review from Rom1-B and stonebuzz April 21, 2026 10:03
@Herafia Herafia self-assigned this Apr 21, 2026
@Herafia Herafia added the bug label Apr 21, 2026
Comment thread inc/mapping.class.php
$mappings_id = $mapping->getID();
echo "<tr class='tab_bg_1'>";
echo "<td class='center'>" . $mapping->fields['name'] . "</td>";
echo "<td class='center'>" . htmlescape($mapping->fields['name']) . "</td>";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this a good opportunity to convert this function to Twig to eliminate the echo?

Comment thread inc/model.class.php
@@ -1331,7 +1331,7 @@ public static function showPreviewMappings($models_id)
echo "<tr class='tab_bg_1'>";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this a good opportunity to convert this function to Twig to eliminate the echo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants