Skip to content

Commit 956fa82

Browse files
marjisoundarelra
andcommitted
set caption href rel to undefined if not simlink
Co-authored-by: Ravi <[email protected]>
1 parent 5424d90 commit 956fa82

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

dotcom-rendering/src/components/CaptionText.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,7 @@ const renderTextElement = (node: Node, key: number): ReactNode => {
6666
* Affiliate links must have the rel attribute set to "sponsored"
6767
* @see https://developers.google.com/search/docs/crawling-indexing/qualify-outbound-links
6868
*/
69-
rel={
70-
isSkimlink(href)
71-
? 'sponsored'
72-
: getAttrs(node)?.getNamedItem('rel')?.value
73-
}
69+
rel={isSkimlink(href) ? 'sponsored' : undefined}
7470
>
7571
{children}
7672
</a>

0 commit comments

Comments
 (0)