Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ To display all static text (such as labels, buttons, and headings) and only mask

6. In the <DNT>User input masking</DNT> section, clear all checkboxes, including <DNT>Mask all user input</DNT> and the specific input type boxes.

7. Add the `nr-mask` class or `data-nr-mask` attribute to specific sensitive inputs in your HTML code that you want to keep masked. For example, if you want to mask credit card numbers but show all other text, add `nr-mask` to the credit card input field:
7. Add the `nr-ignore` class to specific sensitive inputs in your HTML code that you want to keep masked. For example, if you want to mask credit card numbers but show all other text, add `nr-ignore` to the credit card input field:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nr-mask (and data-nr-mask) was the correct attribute before. The problem was that this attribute doesnt work for inputs. This should be reverted back to nr-mask/data-nr-mask. See next comment for clarity.


```html
<!-- This will show normally -->
<label>Credit Card Number</label>

<!-- This will be masked -->
<input type="text" class="nr-mask" id="creditCard" placeholder="1234 5678 9012 3456">
<input type="text" class="nr-ignore" id="creditCard" placeholder="1234 5678 9012 3456">

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<input type="text" class="nr-ignore" id="creditCard" placeholder="1234 5678 9012 3456">
<span class="nr-mask" id="creditCardDisplay">
1234-5678-9012-3456
</span>

```

8. Redeploy your app to apply the changes
Expand Down Expand Up @@ -131,26 +131,35 @@ For example:

## Unmask static text [#unmask-text]

You can use unmask selectors to display specific static text elements without asterisks (\*). This is useful if you want to keep global masking enabled but need certain elements to remain visible.
By default, all static text is masked when you use recommended settings. If you want to explicitly unmask specific static text elements, you can add the `nr-unmask` class or `data-nr-unmask` attribute to that specific element. This is useful when you want to keep global masking enabled but need certain elements to remain visible.

To unmask specific text elements, follow these options:
<Callout variant="tip">
You must use browser agent version 1.256.0 or higher to use the `nr-unmask` and `data-nr-unmask` selectors.
</Callout>

To unmask specific text elements, use one of the following options:

* In the <DNT>New Relic</DNT> platform: On the <DNT>**Application settings**</DNT> page, add CSS selectors to the <DNT>Mask selectors</DNT> field. To unmask all static text, clear this field.
* In your code: Add the `nr-unmask` CSS class or `data-nr-unmask` attribute to your HTML elements.

For example, to display a product name while other text remains masked:
For example, to display a product name while other text remains masked using:

* An inline CSS class:

```html
<h1 class="nr-unmask">Product Name: Premium Widget</h1>
```
```html
<p>Product Name: <span class="nr-unmask">Premium Widget</span></p>
```

* An inline data attribute:

```html
<p>Product Name: <span data-nr-unmask>Premium Widget</span></p>
```

<Callout variant="tip">
You must use browser agent version 1.256.0 or higher to use the `nr-unmask` and `data-nr-unmask` selectors.
</Callout>

## Block site content [#block-content]

You can block entire sections of content on your site, which means the section will appear as an empty placeholder in session replay. For example, if you have an image on your About Us webpage and dont need it captured, you could block the class containing the image.
You can block entire sections of content on your site, which means the section will appear as an empty placeholder in session replay. For example, if you have an image on your About Us webpage and don't need it captured, you could block the class containing the image.

To block specific classes or attributes, you have a few options:

Expand Down
Loading