Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: vbgamer45 on March 06, 2022, 10:37:28 PM

Title: editor in 2.1 adds quotes in bbc link help
Post by: vbgamer45 on March 06, 2022, 10:37:28 PM
I have this bbc code
[url=https://www.ezportal.com/]ezPortal[/url]

Once loaded into the editor with
            $editorOptions = array(
                'id' => 'bbcfield' . $row['id_parameter'],
                'value' => $row['data'],
                'width' => '90%',
                'form' => 'frmeditblock',
                'labels' => array(
                    'post_button' => ''
                ),
            );
            create_control_richedit($editorOptions);
            $context['post_box_name'] = $editorOptions['id'];

It changes on display to
[url="https://www.ezportal.com/"]ezPortal[/url]

Which causes issues due to the quotes added.

DB has no quotes. Just when I try to load the data something is adding quotes not sure what it is.
Title: Re: editor in 2.1 adds quotes in bbc link help
Post by: Sesquipedalian on March 07, 2022, 12:36:36 AM
This is as intended, and will not cause any issues in standard SMF code. #3565 (https://github.com/SimpleMachines/SMF2.1/pull/3565)
Title: Re: editor in 2.1 adds quotes in bbc link help
Post by: vbgamer45 on March 07, 2022, 12:41:19 AM
Good to know that is how it is supposed to be. Was going nuts for a while with 2.0 that noticed it did not have that.

In 2.1 was a little confused since the editor button doesn't put quotes around the url when clicking on the button by default