Skip to content

Commit

Permalink
Merge pull request #107 from KB-iGOT/cbrelease-4.8.19
Browse files Browse the repository at this point in the history
Cbrelease 4.8.19
  • Loading branch information
sureshece16 authored Nov 29, 2024
2 parents a622fe2 + a99ea36 commit 7037e2c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@
<mat-form-field appearance="outline" class="margin-top-xs">
<input id="eventTitle" matInput #eventTitle formControlName="eventTitle"
placeholder="Type here" aria-label="Event Title input" class="form-input"
(keypress)="omit_special_char($event)" maxlength="250" />
(paste)="omit_special_char($event)" (keypress)="omit_special_char($event)"
maxlength="250" />
<mat-error [hidden]="false"
aria-label="Event title Error|Explains event title is required "
*ngIf="createEventForm?.controls['eventTitle']?.touched && createEventForm?.controls['eventTitle'].errors?.required">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms'
export function preventHtmlAndJs(): ValidatorFn {
return (control: AbstractControl): ValidationErrors | null => {
const value = control.value
if (value && value.match(/<[^>]*>|(function[^\s]+)|(javascript:[^\s]+)/i)) {
if (value && value.match(/<[^>]*>|(function\s*\([^)]*\))|(javascript:[^\s]+)/i)) {
return { noHtml: true }
}
return null
Expand Down

0 comments on commit 7037e2c

Please sign in to comment.