Skip to content

fix: escape pipe character with | and enforce UTF-8 file encoding - #19

Open
shellyco-code wants to merge 1 commit into
eclipse:mainfrom
shellyco-code:fix/pipe-character-escaping
Open

shellyco-code wants to merge 1 commit into
eclipse:mainfrom
shellyco-code:fix/pipe-character-escaping

Conversation

@shellyco-code

Copy link
Copy Markdown

Summary of Changes

Fixes #18.

This PR fixes two formatting and encoding bugs in .github/workflows/generate.py:

  1. Fix Pipe Escaping Entity (	 → |):

    • In escape(), pipe characters (|) in project names were previously replaced with 	 (the HTML entity for ASCII Horizontal Tab \t) instead of the pipe entity |.
    • This caused projects with a pipe in their name—such as Eclipse Ignite|IoT (iot.ignite)—to be displayed with an awkward whitespace tab gap (Eclipse Ignite IoT) on the published website.
    • Replacing with | preserves the pipe character visually in HTML while preventing Markdown table parser breakage.
  2. Explicit UTF-8 Encoding:

    • Added encoding="utf-8" to open(OUTPUT, "w") to ensure consistent cross-platform file writing across environments with non-UTF-8 default locales (e.g. Windows cp1252), safeguarding Unicode characters such as ®, ™, and accented letters.

Verification & Testing

  • Executed generate.py against the live Eclipse PMI API (retrieving all 450+ projects across 6 pages).
  • Verified docs/projects.csv:
    • iot.ignite now correctly outputs:
      | Eclipse Ignite|IoT | [iot.ignite](https://projects.eclipse.org/projects/iot.ignite) | [eclipse](https://github.com/eclipse) |
    • Zero occurrences of 	.
  • Verified mkdocs build:
    • Static site built in _site/ without errors.
    • Inspected _site/index.html: Eclipse Ignite|IoT renders the vertical pipe character cleanly inside the table cell.

Signed-off-by

Signed-off-by: shellyco-code shellyco-code@users.noreply.github.com

Signed-off-by: shellyco-code <shellyco-code@users.noreply.github.com>

This branch has not been deployed

No deployments
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.

fix: pipe character in project names escaped with &#9; (tab) instead of &#124; in generate.py

1 participant