Nodes/comfy-ovum/_.unescape
ComfyUI Node

_.unescape

Clean HTML entities out of your prompt text

By sfinktah·Created about a year ago·Updated 10 months ago· 7
_.unescape
  • obj
  • *

Scraped a prompt from a website or an API and it arrived full of &amp;, &lt;, and &quot;? That's HTML entity escaping, and _.unescape is the small node that reverses it. It's the companion to Underscore.js's _.escape: escape turns &, <, >, ", ' into entities, and unescape turns them back. In this pack it's another member of the auto-generated ovum/underscore family, so before you fall in love, know the author's own framing: the README calls this whole family "an absolute disaster to use in production" and a work in progress. For a one-input string cleaner that's harsh, but it's fair to treat these as convenience tools rather than mission-critical graph furniture.

How it works

Every _. node here is a generated wrapper around underscore3, the Python port of Underscore.js that ships inside the repo. _.unescape takes your string, walks it for the five named HTML entities plus their numeric forms, and replaces them with the literal characters. Feed it This &amp; that and you get This & that.

Like all the method nodes, it has a chaining mode: pass a _.CHAIN (from _.chain or another underscore method) and it continues the pipeline instead of returning a plain value - unwrap at the end with _.value. Pass a plain string and it just gives you the result.

Inputs and output

Just one input: obj (type *, optional). Wire in any string - it also tolerates being handed JSON-serializable values, since the wrapper is generic. The output is *, so downstream sockets won't know it's a string; that's normal for this family. There's no widget to type into, so you must connect something upstream.

Install

Same as any comfy-ovum node. ComfyUI Manager: search comfy-ovum, install, restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/sfinktah/comfy-ovum

Then restart ComfyUI. No model downloads; underscore3 is vendored in the pack, so there's nothing extra to install for this node specifically.

Realistic use

Honestly? This is a niche utility. It earns its keep when you're pulling captions or tags from a web API that HTML-escapes its output, or cleaning up a wildcard file that got mangled by an exporter. If your prompts come from Danbooru-style APIs or a browser extension, you might see &amp; and &lt; regularly. If your text all comes from your own keyboard, this node has no job and that's fine.

Categoryovum/underscore

Inputs (1)

NameTypeDefaultDescription
objopt*Primary input object. Also accepts _.CHAIN to continue chaining.

Outputs (1)

NameTypeDescription
**