Skip to content

Commit

Permalink
Add “safe” attributes for various link properties to allow `setAttrib…
Browse files Browse the repository at this point in the history
…utes` correctly
  • Loading branch information
engram-design committed Aug 20, 2024
1 parent cc09080 commit 50f4d40
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/base/Link.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ public function defineRules(): array
{
$rules = parent::defineRules();

$rules[] = [['label', 'handle', 'enabled', 'newWindow', 'linkValue', 'linkText', 'ariaLabel', 'urlSuffix', 'linkTitle', 'classes', 'customAttributes'], 'safe'];

// Validation for only when saving Hyper fields and their settings
$rules[] = [['label', 'handle'], 'required', 'on' => [self::SCENARIO_SETTINGS]];

Expand Down

0 comments on commit 50f4d40

Please sign in to comment.