redactor icon indicating copy to clipboard operation
redactor copied to clipboard

Reference Tag leaking into the frontend.

Open msimpson opened this issue 3 years ago • 0 comments

Description

I've added a additional link options through the RegisterLinkOptionsEvent for Solspace Calendar Events (see below).

However, I'm seeing the Reference Tag leaking into the fragment portion of URLs on the frontend when used, e.g.:

https://example.com/calendar/event#Solspace%5CCalendar%5CElements%5CEvent:100000@1
Event::on(

  RedactorField::class,

  RedactorField::EVENT_REGISTER_LINK_OPTIONS,

  function( RegisterLinkOptionsEvent $event ) {

    $event->linkOptions[] = [

      'optionTitle' => 'Link to an event',

      'elementType' => CalendarEvent::class,

      'refHandle' => CalendarEvent::refHandle(),

      'sources' => '*',

      'criteria' => [ 'uri' => ':notempty:' ],

    ];

  }

);

Can anyone provide additional insight and/or identify issues with the above code?

Additional info

  • Craft version: Craft Pro 3.7.50
  • PHP version: 7.4.29
  • Database driver & version: MySQL 5.5.5
  • Plugins & versions: Redactor (2.10.10) and Calendar (3.3.14)

msimpson avatar Aug 25 '22 18:08 msimpson