Support Forum

URL shortening

1 2 >
BSABantam
UK
Member
Free Members
May 13, 2018 - 10:03 am

Will URL shortening include https:// addresses in the soon to be released update?

Mr Papa
Simi Valley, CA
Member
Free Members
May 13, 2018 - 6:47 pm

currently investigating if this is an issue or not... frankly, not sure we ever tried it... 😉

Mr Papa
Simi Valley, CA
Member
Free Members
May 13, 2018 - 6:59 pm

so yeah, does look like there is an issue there... thanks for reporting it...  will get a ticket opened for it and look at resolution - suspect its an easy fix...  if so, we can post it back here for you to use now...

BSABantam
UK
Member
Free Members
May 14, 2018 - 6:18 am

OK, thanks.

Mr Papa
Simi Valley, CA
Member
Free Members
May 14, 2018 - 11:32 pm

think we have identified the issue...  working in a couple of quick tests...  more in depth testing needed, but looks promising... 

its a one line fix, so if it holds together, we will post the change here before too long...

Yellow Swordfish
Glinton, England
Member
May 15, 2018 - 2:56 am

Here is the code fix should you want to make it. The file in question is:

/wp-content/plugins/simple-press/sp-api/sp-api-filters.php

This is a big file ansd the function needed is about one-third of the way through it around line 588:

sp_format_links()

In that function is this line of code:

$chunked = (strlen($urlname) > $charcount && preg_match('#^(http://|ftp://|www\.)#is', $urlname)) ? substr_replace($urlname, '.....', ($charcount - 10), -10) : $urlname;

Comment that kine out - put a hash (#) in front of the code line - then add below it this replacement:

$chunked = (strlen($urlname) > $charcount && preg_match('#^(http://|https://|ftp://|www\.)#is', $urlname)) ? substr_replace($urlname, '.....', ($charcount - 10), -10) : $urlname;

That should sort the issue.

BSABantam
UK
Member
Free Members
May 15, 2018 - 7:18 am

That did the trick, thanks.

Great response as always!

Yellow Swordfish
Glinton, England
Member
May 15, 2018 - 8:29 am

Always welcome
And thanks for the confirmation.

BSABantam
UK
Member
Free Members
Sep 17, 2018 - 10:35 am

Was this fix supposed to be included in the recent update, or only in the forthcoming major release?

Mr Papa
Simi Valley, CA
Member
Free Members
Sep 17, 2018 - 11:29 am

Not until 6. 0 comes out... The one past week was a security fix... 

6.0 is essentially ready... Just have to find time everyone is around to release... Vacations and work travel getting in the way 😉 

1 2 >