# Defang URL

## Description

This operation makes URLs safe to share by preventing accidental clicks or access. This is especially useful in cybersecurity contexts, where you might need to share potentially malicious URLs without making them active links.

***

## Data types

These are the input/output expected data types for this operation:

### Input data

![](/files/lPHCVhp93aYrWgLIlhNp) - URLs you want to defang.

### Output data

![](/files/3itBmKrRqasWlG3dGBlS) - Defanged URLs.

***

## Parameters

These are the parameters you need to configure to use this operation (mandatory parameters are marked with a <mark style="color:red;">**\***</mark>):

<details>

<summary>Escape Dots<mark style="color:red;"><strong>*</strong></mark></summary>

Set this parameter to **true** if you want to replace `.` in the domain with `[.]`. This breaks the URL’s domain and subdomain structure, making the URL inactive. For example, `example.com` becomes `example[.]com`.

</details>

<details>

<summary>Escape HTTP<mark style="color:red;"><strong>*</strong></mark></summary>

Set this parameter to **true** if you want to modify `http` or `https` to `hxxp` or `hxxps`, respectively. This makes the protocol itself inactive, adding an extra layer of safety.

</details>

<details>

<summary>Escape ://<mark style="color:red;"><strong>*</strong></mark></summary>

Set this parameter to **true** if you want to replace the `://` separator with `[://]`, making it clear where the protocol ends while breaking its functionality.

</details>

<details>

<summary>Process Type<mark style="color:red;"><strong>*</strong></mark></summary>

Choose one of the following options:

* **Valid domains and full URLs** - Processes both complete URLs (like `https://example.com`) and standalone domain names (like `example.com`) for defanging.
* **Only full URLs** - Processes only fully qualified URLs, ignoring standalone domain names.
* **Everything** - Applies defanging to all potential URLs, domain names, or anything resembling a URL in the text.

</details>

***

## Example

Suppose you want to **defang** a series of events that represent **URLs**:

1. In your Pipeline, open the required [Action](/the-workspace/pipelines/actions.md) configuration and select the input **Field**.
2. In the **Operation** field, choose **Defang URL**.
3. Set **Escape Dots** to **true**.
4. Set **Escape HTTP** to **true**.
5. Set **Escape ://\*** to **false**.
6. Set **Process Type** to **Everything**.
7. Give your **Output field** a name and click **Save**. The URLs in your input field will be defanged. For example:

```
Input data - "https://example.com"

Escape Dots - true

Escape HTTP - true

Escape :// - false

Process Type - Everything

Output data - "hxxps://example[.]com"
```

{% hint style="info" %}
You can try out operations with specific values using the **Input** field above the operation. You can enter the value in the example above and check the result in the **Output** field.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.onum.com/the-workspace/pipelines/actions/transformation/field-transformation/field-transformation-operations/networking/defang-url.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
