McRogueFace/docs
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
..
stubs Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
API_REFERENCE_COMPLETE.md Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
api_reference_complete.html docs: Add complete API reference documentation 2025-10-23 13:19:36 -04:00
api_reference_dynamic.html fix: escape HTML in descriptions before link transformation 2025-10-30 11:48:09 -04:00