@TraceElement I just realized that it should actually be possible to remove the trailing slash in L&L even in instances where your URL includes other slashes. I was checking out the length
attribute for the Format
tag and I noticed it said this underneath:
It uses PHP’s mb_substr function
Clicking on that link made me realize that this seems to accept negative numbers so I tried it and sure enough, if you use something like length=-5
, it’ll chop off the last five characters. So in your case, you could probably do something like this if your URLs are always going to end in a slash:
<Format replace="https://" with="" length=-1><Field website /></Format>
And if the URLs only sometimes end in a slash, you could try something like this:
<Format replace="https://" with="">
<If field=website ends_with value="/">
<Format length="-1"><Field website /></Format>
<Else />
<Field website />
</If>
</Format>