Commit d3eb10de authored by Amacado's avatar Amacado Committed by Eric Sembrat
Browse files

Issue #3312951: Form validation error when font keywords are used

parent 6bcaf4f5
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -237,9 +237,10 @@ class FontCKEditorButton extends CKEditorPluginBase implements CKEditorPluginCon
          $pattern = '@^\s*[a-zA-Z0-9\,\-\s]+\s*\|\s*.+\s*$@';
          break;
        case 'size':
          // Match for patterns:
          // Match for patterns and font size keywords:
          // 123px/pt/em/rem/%|Label
          $pattern = '@^\s*\d+(\.?\d+)?(px|em|%|pt|rem)\|.*$@';
          $fontSizeKeywords = ['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large', 'xxx-large', 'larger', 'smaller', 'inherit', 'initial', 'revert', 'revert-layer', 'unset'];
          $pattern = '@^(\s*\d+(\.?\d+)?(px|em|%|pt|rem)|('.implode('|', $fontSizeKeywords).'))\|.*$@';
          break;
      }