Advertisement:

Author Topic: SMF 2.x url and iurl tags bug  (Read 6310 times)

Offline asmith

  • Jr. Member
  • **
  • Posts: 371
  • Gender: Male
SMF 2.x url and iurl tags bug
« on: January 18, 2016, 03:35:42 AM »
Hello,

I don't know if this is intended. On both 2.0.x and 2.1 versions.

Both of url and iurl tags, when the address is inside quotes, the output link breaks. (both single quotes and double quotes)

example:
simplemachines.org

Moreover, on SMF 2.1 Beta 2, if the link is added via the sceditor button (WYSIWYG mode). It inserts iurl tag (instead of url) and if the given address has space in it, it adds double quotes and there we have a broken link.

Offline Suki

  • Kaizoku Jotei
  • Developer
  • SMF Super Hero
  • *
  • Posts: 15,306
  • I don't really come from outer space
    • MissAllSunday on GitHub
    • SMF mods
Re: SMF 2.x url and iurl tags bug
« Reply #1 on: January 26, 2016, 10:07:13 AM »
Hi, not sure if I understood you right.  So you are trying to do this:

[url]"http://www.simplemachines.org/community/index.php"[/url]

If thats the case then yes it will fail as either single or double quotes cannot be used in an url, SMF encodes the single quotes but the result is an invalid url. Perhaps what you want to achieve is this:

"http://www.simplemachines.org/community/index.php"

[url=http://www.simplemachines.org/community/index.php]"http://www.simplemachines.org/community/index.php"[/url]
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Look at them. They're just asking for it. Maybe the human race deserves to be wiped out.

Offline asmith

  • Jr. Member
  • **
  • Posts: 371
  • Gender: Male
Re: SMF 2.x url and iurl tags bug
« Reply #2 on: January 28, 2016, 03:32:45 AM »
No, that's not what I meant.
This is the example I used:

[url="http//www.simplemachines.org"]simplemachines.org[/url]

Some urls have space in them. (bad practice but they exist)

[url="http//www.example.com/my file.mp3"]My song[/url]

and as I mentioned in the first post, when in WYSIWYG mode (SMF 2.1) and trying to add a link via the link button on top, if the URL has space in it, sceditor automatically wraps it up in double quotes. (also inserts iurl instead of url)

Offline Suki

  • Kaizoku Jotei
  • Developer
  • SMF Super Hero
  • *
  • Posts: 15,306
  • I don't really come from outer space
    • MissAllSunday on GitHub
    • SMF mods
Re: SMF 2.x url and iurl tags bug
« Reply #3 on: February 03, 2016, 11:00:33 AM »
I cannot reproduce this on SMF 2.1

Using your example:

http//www.example.com/my file.mp3

Using WYSIWYG mode I get a clean url, the same with using BBC tags. What 2.1 version are you using? or what are the steps you do to reproduce this behavior?
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Look at them. They're just asking for it. Maybe the human race deserves to be wiped out.

Offline asmith

  • Jr. Member
  • **
  • Posts: 371
  • Gender: Male
Re: SMF 2.x url and iurl tags bug
« Reply #4 on: February 04, 2016, 01:02:06 AM »
I just downloaded the latest from Github and the WYSIWYG bug is not happening there anymore. :)

But this double quote use:

[url="http//www.example.com/my file.mp3"]My song[/url]

Includes double quotes in the url. Is that intended?

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 56,701
  • Gender: Male
    • Kindred-999 on GitHub
Re: SMF 2.x url and iurl tags bug
« Reply #5 on: February 04, 2016, 08:03:29 AM »
just don't put the url in quotes?
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Gwenwyfar

  • Pirate Valkyrie Neko-chan
  • Lead Customizer
  • Sophist Member
  • *
  • Posts: 1,353
  • Gender: Female
    • Gwenwyfar on GitHub
Re: SMF 2.x url and iurl tags bug
« Reply #6 on: March 03, 2018, 03:22:04 PM »
The tag is not made to use quotes, so this isn't a bug. You can fill in a url that contains spaces without the quotes and it will work fine.

The iurl problem in WYSIWYG has been fixed.
Do you live today a life you would like to have for eternity?

Offline asmith

  • Jr. Member
  • **
  • Posts: 371
  • Gender: Male
Re: SMF 2.x url and iurl tags bug
« Reply #7 on: March 11, 2018, 03:56:09 PM »
Not an issue, but only for the sake of the argument, if quotes are not supported, the URL tag (or similar ones) cannot accept optional parameters. Let's say if a mod wanted to.

Assuming spaces in url tag already work, how about this one:
[url=http//www.example.com/my file.mp3 author=artist]My song[/url]

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 56,701
  • Gender: Male
    • Kindred-999 on GitHub
Re: SMF 2.x url and iurl tags bug
« Reply #8 on: March 11, 2018, 05:45:43 PM »
That’s because spaces are not valid in a url, unless the are encoded....

%20 is the encoding for a space.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Sesquipedalian

  • Lead Developer
  • Jr. Member
  • *
  • Posts: 317
  • Gender: Male
  • It works! ... in theory.
    • Sesquipedalian on GitHub
Re: SMF 2.x url and iurl tags bug
« Reply #9 on: April 05, 2018, 11:21:40 AM »
It is worth noting that SMF 2.1 does in fact support [url="http://www example.com"]example[/url] syntax. See https://github.com/SimpleMachines/SMF2.1/pull/3565.
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

Offline Bigguy

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,568
  • Gender: Male
  • Be nice, or else....
    • smfbigguy on GitHub
    • Whats Ur Beef
Re: SMF 2.x url and iurl tags bug
« Reply #10 on: April 05, 2018, 11:38:21 AM »
The tag is not made to use quotes, so this isn't a bug. You can fill in a url that contains spaces without the quotes and it will work fine.

The iurl problem in WYSIWYG has been fixed.

Updated mine not to long ago because the iurl was fixed. After installing I find it is not fixed. In my version anyway. As I said I updated my site after it said on GH that the iurl problem was fixed. I still have to change from iurl to url when using the editor.

Offline Illori

  • Project Manager
  • SMF Master
  • *
  • Posts: 49,581
Re: SMF 2.x url and iurl tags bug
« Reply #11 on: April 05, 2018, 11:43:00 AM »
you created a bug on github about it right? if it is still open add a comment to it, if the issue is closed create a new one so we are sure the devs know the issue may not actually be resolved, but you should upgrade to the latest code first.

Offline Bigguy

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,568
  • Gender: Male
  • Be nice, or else....
    • smfbigguy on GitHub
    • Whats Ur Beef
Re: SMF 2.x url and iurl tags bug
« Reply #12 on: April 05, 2018, 11:46:15 AM »
I just did a few days ago. I guess when I get home from work I can do it again. If it is still there after that then I will open an issue.

Offline Bigguy

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,568
  • Gender: Male
  • Be nice, or else....
    • smfbigguy on GitHub
    • Whats Ur Beef
Re: SMF 2.x url and iurl tags bug
« Reply #13 on: April 05, 2018, 09:09:13 PM »
Ok so I just completed an upgrade. I ran the upgrade.php not just overwriting the files. Two issues I see right now.

1.) iurl is still present in the editor. I have to switch to source view and edit the tags to make it work right.
2.) Pressing spellcheck saves a draft. It does not open a popup window. confirmed on two site.

This upgrade is from the very latest on GH. Cache (browser) has been cleared and all maintenance ran on the forum. To the best of my knowledge, with my server rebooted and SMF reporting that spell check does in fact work...all it does when pressing it is save a draft.

Offline Bigguy

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,568
  • Gender: Male
  • Be nice, or else....
    • smfbigguy on GitHub
    • Whats Ur Beef

Offline Bigguy

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,568
  • Gender: Male
  • Be nice, or else....
    • smfbigguy on GitHub
    • Whats Ur Beef
Re: SMF 2.x url and iurl tags bug
« Reply #15 on: April 05, 2018, 09:14:59 PM »
Please move this out of fixed or bogus bugs.

Offline Bigguy

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,568
  • Gender: Male
  • Be nice, or else....
    • smfbigguy on GitHub
    • Whats Ur Beef
Re: SMF 2.x url and iurl tags bug
« Reply #16 on: April 09, 2018, 07:26:24 PM »
This is concerning spellcheck. I just installed SMF Articles mod on my site. I was playin around a bit. I tested the article and I saw it had a spell check button, so I pushed it. A popup window showed up and checked my spelling. So it is working on the server and in this mod but not when posting a message on the forum.

Mod I installed:

https://custom.simplemachines.org/mods/index.php?mod=1354

Offline Bigguy

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,568
  • Gender: Male
  • Be nice, or else....
    • smfbigguy on GitHub
    • Whats Ur Beef
Re: SMF 2.x url and iurl tags bug
« Reply #17 on: April 10, 2018, 07:26:45 AM »
This is the only error I can find for the spell check. When pushing the button it stays down and generates this:

 TypeError: sceditor.instance(...).storeLastState is not a function


Found this in editor.js

// Start up the spellchecker!
smc_Editor.prototype.spellCheckStart = function()
{
   if (!spellCheck)
      return false;

   var e = $('#' + this.sUniqueId).get(0);

   sceditor.instance(e).storeLastState();

Offline Bigguy

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,568
  • Gender: Male
  • Be nice, or else....
    • smfbigguy on GitHub
    • Whats Ur Beef
Re: SMF 2.x url and iurl tags bug
« Reply #18 on: April 10, 2018, 06:03:10 PM »
Spellcheck is a bug. Just updating the thread.

Offline Bigguy

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,568
  • Gender: Male
  • Be nice, or else....
    • smfbigguy on GitHub
    • Whats Ur Beef
Re: SMF 2.x url and iurl tags bug
« Reply #19 on: April 14, 2018, 05:24:37 PM »
Ok, I asked on GH but this is probably the better place to get feedback so they can get work done over there:

If you have the editor on and you click on the link icon and fill in both fields...the url and the description and post that. The link opens as it should (In a new tab without iurl). If you have the editor on and you highlight some text in your post then click the link icon and just fill in the url and not the description this is when it inserts the iurl. Is this behavior supposed to be like this.

When I posted this bug all I was doing was highlighting text and pressing the link icon to insert a url to that text. I never tried entering a description and a url in the link icon. So I have to ask are both these actions intended and this is not a bug for iurl. ??