MCPcopy Create free account
hub / github.com/FSoft-AI4Code/CodeWiki / _escape_html

Method _escape_html

codewiki/cli/html_generator.py:219–234  ·  view source on GitHub ↗

Escape HTML special characters. Args: text: Text to escape Returns: Escaped text

(self, text: str)

Source from the content-addressed store, hash-verified

217 f'<div class="info-row"><strong>Model:</strong> {self._escape_html(info["main_model"])}</div>'
218 )
219
220 if info.get("timestamp"):
221 try:
222 from datetime import datetime
223
224 timestamp = info["timestamp"]
225 # Parse ISO format timestamp
226 if isinstance(timestamp, str):
227 dt = datetime.fromisoformat(timestamp.replace("Z", "+00:00"))
228 formatted_date = dt.strftime("%Y-%m-%d")
229 html_parts.append(
230 f'<div class="info-row"><strong>Generated:</strong> {formatted_date}</div>'
231 )
232 except Exception:
233 pass
234
235 if info.get("commit_id"):
236 commit_short = info["commit_id"][:8]
237 html_parts.append(

Callers 2

generateMethod · 0.95
_build_info_contentMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected