McRogueFace/tools
John McCardle 7f253da581 fix: escape HTML in descriptions before link transformation
Fixes HTML injection vulnerability in generate_dynamic_docs.py where
description text was not HTML-escaped before being inserted into HTML
output. Special characters like <, >, & could be interpreted as HTML.

Changes:
- Modified transform_doc_links() to escape all non-link text when
  format='html' or format='web'
- Link text and hrefs are also properly escaped
- Non-HTML formats (markdown, python) remain unchanged
- Added proper handling for descriptions with mixed plain text and links

The fix splits docstrings into link and non-link segments, escapes
non-link segments, and properly escapes content within link patterns.

Tested with comprehensive test suite covering:
- Basic HTML special characters
- Special chars with links
- Special chars in link text
- Multiple links with special chars

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-30 11:48:09 -04:00
..
generate_api_docs.py Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
generate_api_docs_html.py Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
generate_api_docs_simple.py Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
generate_color_table.py Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
generate_complete_api_docs.py Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
generate_complete_markdown_docs.py Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
generate_dynamic_docs.py fix: escape HTML in descriptions before link transformation 2025-10-30 11:48:09 -04:00
generate_stubs.py Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
generate_stubs_v2.py Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
gitea_issues.py feat: Add development tooling scripts 2025-10-23 13:19:25 -04:00
test_link_transform.py feat: add link transformation to documentation generator 2025-10-30 11:39:54 -04:00
test_vector_docs.py feat: convert PyVector properties to use macros 2025-10-30 11:33:49 -04:00
ui_methods_documentation.py Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00