Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #37758, comment 7


Ignore:
Timestamp:
02/11/2022 03:09:03 PM (2 years ago)
Author:
aleksganev
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #37758, comment 7

    initial v1  
    11Hey guys, this is my first patch, so I hope I did everything correctly.
    22
    3 I used @azaozz's suggestion and made the validation mark as invalid everything except ''http(s)'', ''mailto'' and ''ftp'' links. I reused the ''email'' check which was already in the file \, added a new test that checks for "ftp:" in the beginning of the link and modified the ''link'' check, so that it allows only valid http and https urls. If all 3 of the tests fail, the string will be marked as invalid.
     3I used @azaozz's suggestion and made the validation mark as invalid everything except ''http(s)'', ''mailto'' and ''ftp'' links. I reused the ''email'' check which was already in the file, added a new test that checks for "ftp:" in the beginning of the link and modified the ''link'' check, so that it allows only valid http and https urls. If all 3 of the tests fail, the string will be marked as invalid.