Skip to content

Commit

Permalink
fix: support query string in links
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaaaly authored May 13, 2021
1 parent 23000ed commit a8ec71c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class ImageComponent implements OnInit, OnDestroy {
form = new FormGroup({
src: new FormControl('', [
Validators.required,
Validators.pattern('(https?://)?([\\da-z.-]+)\\.([a-z.]{2,6})[/\\w .-]*/?')
Validators.pattern('(https?://)?([\\da-z.-]+)\\.([a-z.]{2,6})[/\\w .-]*/??([^#\n\r]*)?#?([^\n\r]*)')
]),
alt: new FormControl(''),
title: new FormControl('')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class LinkComponent implements OnInit, OnDestroy {
form = new FormGroup({
href: new FormControl('', [
Validators.required,
Validators.pattern('(https?://)?([\\da-z.-]+)\\.([a-z.]{2,6})[/\\w .-]*/?')
Validators.pattern('(https?://)?([\\da-z.-]+)\\.([a-z.]{2,6})[/\\w .-]*/??([^#\n\r]*)?#?([^\n\r]*)')
]),
text: new FormControl('', [Validators.required]),
openInNewTab: new FormControl(true)
Expand Down

0 comments on commit a8ec71c

Please sign in to comment.