Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

1.9 KB
Raw Blame

Citation hyperlinks are built only from destinations that can safely be followed, and only from the sanitized value. A source URL whose scheme is outside http/https (javascript:, data:, vbscript:, blob:) no longer reaches the ](url) of a generated markdown link, whatever citation format is selected; the citation degrades to a plain [N] bracket instead (#6392).

Further shapes are refused or neutralized, because a scheme check alone can be walked around. A destination carrying a control character is refused: the parser strips tabs, newlines and leading C0 controls only in order to read the scheme, so they survive into the link, and a newline ends the destination and turns the rest of the URL into document body. The scheme and control-character checks also run on the destination with its HTML character references decoded: marked and Python-Markdown copy it into the href as written, and the browser then decodes javascript:alert(1) into a live javascript: link. The URL is still emitted as written, so &-joined query strings keep working. A scheme-less destination that names a host (//host/x, ///host/x) is refused. Characters markdown reads as syntax (unbalanced parentheses, spaces, angle brackets, quotes) are percent-encoded, so a URL can no longer close the citation link early and write a second, live link after it. IPv6 literals keep their brackets and ordinary URLs keep resolving, since a server decodes %29 back to ).

Only SOURCE_TAGGED_HYPERLINKS checked the destination before, so every other format relied on the browser's DOMPurify pass to strip a hostile href. An exported .md, .qmd or .tex never went through that pass at all. Both places that build the citation map are covered: the Sources block parsed out of the model's prose, and the structured search-result list used when the model emits no Sources block. Relative URLs, which a library document uses, still link as before.