# parse_icon_url · FT4 Rell API · Chromia Docs (concept)

> function parse_ icon_ url(icon_ url: text): text Tests whether an asset icon URL is invalid. It will not try to resolve the URL, but it will
remove trailin

Source: https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.assets/parse_icon_url/

FUNCTION

# parse\_icon\_url

```signature
function parse_icon_url(icon_url: text): text
```

[Source](https://gitlab.com/chromaway/ft4-lib/-/blob/development/rell/src/lib/ft4/core/assets/asset.rell#lines-390)

Tests whether an asset icon URL is invalid. It will not try to resolve the URL, but it will
remove trailing and leading whitespace and check that the string looks like an URL.

Throws `"INVALID ASSET URL"` if the URL is over 2048 characters or it does not match
this regex pattern: `^\S+:\/\/[^\s$.?#].[^\s]*$`

**Parameters**

* **icon\_url** — the URL to trim and check

**Returns**

the URL with whitespace removed.

[View this page on docs.chromia.com](https://docs.chromia.com/pages/ft4-rell/-f-t4%20-library/lib.ft4.core.assets/parse_icon_url.html)Generated API reference, mirrored from the live docs
