Replacing BBCode urls with nofollow

Hi everyone

I have a Rich Text Input that reads from the database like this:
image

in the database there is text like this:

[url=https://www.amazon.com]Amazon[/url][/color][/font][/size] [size=4]with a w[/size][size=4][font="Roboto"]ide selection to choose from and with quick delivery options.[/font][/size]

I am trying a Find & Replace on the end of this Rich text input to find/replace these urls with nofollow.

So finding (\[url=https:\/\/.*)\](.*\[\/url\])
and replacing with

$1  nofollow=true]$2

However, when the html is drawn it looks like this the following which isn’t quite right.

What am I doing wrong?

It seems that even if I do this when saving to the database, the same thing happens…

I think it’s because Rich Text Input isn’t correctly applying nofollow but Text Input does, if it’s BBCode in th DB

This topic was automatically closed after 70 days. New replies are no longer allowed.