]> Untitled Git - lemmy-ui.git/blobdiff - src/shared/components/post/post-listing.tsx
Adding nofollow to links. Fixes #542 (#543)
[lemmy-ui.git] / src / shared / components / post / post-listing.tsx
index 36bb912272ea3872e0cd17ca67958e6af9b7d51d..51ea8b3c553051be505513f9bf0ce5ecf5e1ec3c 100644 (file)
@@ -36,6 +36,7 @@ import {
   mdToHtml,
   numToSI,
   previewLines,
+  relTags,
   setupTippy,
   showScores,
   wsClient,
@@ -244,7 +245,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
         <a
           class="text-body d-inline-block position-relative mb-2"
           href={post.url}
-          rel="noopener"
+          rel={relTags}
           title={post.url}
         >
           {this.imgThumb(this.imageSrc)}
@@ -272,7 +273,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
             className="text-body"
             href={post.url}
             title={post.url}
-            rel="noopener"
+            rel={relTags}
           >
             <div class="thumbnail rounded bg-light d-flex justify-content-center">
               <Icon icon="external-link" classes="d-flex align-items-center" />
@@ -335,7 +336,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
                 className="text-muted font-italic"
                 href={post_view.post.url}
                 title={post_view.post.url}
-                rel="noopener"
+                rel={relTags}
               >
                 {hostname(post_view.post.url)}
               </a>
@@ -418,7 +419,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
               className={!post.stickied ? "text-body" : "text-primary"}
               href={post.url}
               title={post.url}
-              rel="noopener"
+              rel={relTags}
             >
               {post.name}
             </a>