mirror of
https://github.com/processwire/processwire.git
synced 2025-08-17 20:11:46 +02:00
Fix issue processwire/processwire-issues#490 where ProcessPageEditLink didn't allow for external link rel attributes with space separated values
This commit is contained in:
@@ -113,9 +113,9 @@ class ProcessPageEditLink extends Process implements ConfigurableModule {
|
|||||||
'rootParentUrl' => $this->page->rootParent->url,
|
'rootParentUrl' => $this->page->rootParent->url,
|
||||||
'slashUrls' => $this->page->template ? $this->page->template->slashUrls : 1,
|
'slashUrls' => $this->page->template ? $this->page->template->slashUrls : 1,
|
||||||
'urlType' => $this->urlType,
|
'urlType' => $this->urlType,
|
||||||
'extLinkRel' => $this->extLinkRel,
|
'extLinkRel' => $this->wire('sanitizer')->names($this->extLinkRel),
|
||||||
'extLinkTarget' => $this->extLinkTarget,
|
'extLinkTarget' => $this->extLinkTarget,
|
||||||
'extLinkClass' => $this->extLinkClass,
|
'extLinkClass' => $this->wire('sanitizer')->names($this->extLinkClass),
|
||||||
));
|
));
|
||||||
|
|
||||||
parent::init();
|
parent::init();
|
||||||
@@ -447,20 +447,20 @@ class ProcessPageEditLink extends Process implements ConfigurableModule {
|
|||||||
$fieldset->icon = 'external-link';
|
$fieldset->icon = 'external-link';
|
||||||
$fieldset->collapsed = Inputfield::collapsedBlank;
|
$fieldset->collapsed = Inputfield::collapsedBlank;
|
||||||
|
|
||||||
$f = $this->wire('modules')->get('InputfieldName');
|
$f = $this->wire('modules')->get('InputfieldText');
|
||||||
$f->attr('name', 'extLinkClass');
|
$f->attr('name', 'extLinkClass');
|
||||||
$f->label = 'class';
|
$f->label = 'class';
|
||||||
$f->attr('value', $data['extLinkClass']);
|
$f->attr('value', $this->wire('sanitizer')->names($data['extLinkClass']));
|
||||||
$f->required = false;
|
$f->required = false;
|
||||||
$f->columnWidth = 34;
|
$f->columnWidth = 34;
|
||||||
$fieldset->add($f);
|
$fieldset->add($f);
|
||||||
|
|
||||||
$f = $this->wire('modules')->get('InputfieldName');
|
$f = $this->wire('modules')->get('InputfieldText');
|
||||||
$f->attr('name', 'extLinkRel');
|
$f->attr('name', 'extLinkRel');
|
||||||
$f->notes = $this->_('Example: Specifying **nofollow** would make external links default to be not followed by search engines.');
|
$f->notes = $this->_('Example: Specifying **nofollow** would make external links default to be not followed by search engines.');
|
||||||
$f->label = 'rel';
|
$f->label = 'rel';
|
||||||
$f->required = false;
|
$f->required = false;
|
||||||
$f->attr('value', $data['extLinkRel']);
|
$f->attr('value', $this->wire('sanitizer')->names($data['extLinkRel']));
|
||||||
$f->columnWidth = 33;
|
$f->columnWidth = 33;
|
||||||
$fieldset->add($f);
|
$fieldset->add($f);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user