DEV Community

NAN
NAN

Posted on

Why Perplexity citations break the moment you paste them (and what to do about it)

A Perplexity answer is worth reading because of the little numbered chips scattered through it. Take those away and you are left with confident prose from an unnamed source — which is exactly what you get when you select an answer, hit Ctrl+C, and paste it into a document.

I kept hitting this while collecting research notes, so I went and looked at what the browser is actually doing. The answer turned out to be more interesting than "copy-paste is lossy".

What a citation actually is on the page

Those [1] [2] markers are not text. In the rendered DOM each one is roughly an anchor wrapping a styled span:

<a href="https://example.com/source" target="_blank" rel="noopener">
  <span class="citation-chip">1</span>
</a>
Enter fullscreen mode Exit fullscreen mode

The number you see is a label. The value is the href next to it, plus the entry it points at in the sources list further down the page.

When you copy a selection, the browser puts several representations on the clipboard at once. The two that matter:

  • text/plain — a flattened string. Every element becomes its text content. The anchor disappears; 1 survives as the character "1".
  • text/html — a serialised fragment of the selected DOM, anchors and all.

So the information is not lost at copy time. It is lost at paste time, depending on what the destination asks for.

Why the destination decides

Paste into a plain-text field and you get text/plain. That is the whole story — the URLs were never offered.

Paste into Word or Google Docs and it asks for text/html, which does carry the anchors. In practice you still lose them, for two reasons.

First, the sources list lives outside your selection. Unless you deliberately scrolled down and included it, the chips now point at URLs while the reference list they belong to stayed behind in the tab.

Second, editors rewrite what they accept. Google Docs keeps simple <a href> but discards the surrounding classes, so a numbered chip collapses into a bare digit with a link buried under it. Word's HTML importer is more aggressive again. Neither is a bug exactly — they are sanitising foreign markup, which is the right instinct in general and unhelpful here.

There is a third failure mode people hit with Pro Search. A multi-step search renders progressively. Select while a step is still resolving and you copy the DOM as it exists at that instant, which is a partial answer with dangling references.

The options, honestly assessed

Print to PDF. Fastest thing that works. Ctrl+P renders the whole page, sources included, and the links stay clickable in most PDF viewers. The output is a screenshot of a web page — page furniture, sidebars, awkward breaks — so it is fine for an archive and poor for anything you intend to edit.

Paste as HTML deliberately. In Google Docs, paste normally rather than as plain text, then scroll up and copy the sources list separately. Tedious, but it costs nothing and the links survive.

Markdown by hand. If you already work in Obsidian or a repo, rewriting the citations as reference-style links gives you the cleanest artifact. It also takes the longest, so it only pays off for something you will reread.

A browser extension. Reads the DOM before the clipboard flattens it, walks the anchors, and writes a document with the references and the source list already reconciled.

Disclosure

I build one of those extensions, so treat the next paragraph as what it is.

I wrote Chat Exporter for Perplexity after doing the manual dance one time too many. It exports a thread to Word, PDF, Google Docs, Notion, Markdown or JSON, keeps the inline references pointing at their sources, and brings the source list along instead of leaving it in the tab. Pro Search threads come out as one document with the order of the investigation intact, and it behaves the same inside Spaces. Free tier, paid plan for unlimited exports.

Two honest limits. It reads what is rendered, so if the sources panel is collapsed those links are not on the page to capture — expand it first. And exporting mid-stream on a Pro Search gets you the steps that finished, same as selecting mid-stream does.

The part worth keeping

Whatever route you take, the rule underneath is the same: the citation is the href, not the number. Anything that reduces the page to its text content has thrown the answer's provenance away and kept its confidence, which is the worst half to keep.

If you do nothing else, expand the sources list before you copy. Most of the loss people blame on the AI is really the clipboard doing exactly what it was asked.


Curious what the other tools do here — if you have a workflow for keeping research citations intact across Perplexity, NotebookLM or similar, I would like to read it.

Top comments (0)