Skip to content

Commit

Permalink
Incorrect specification of irc as URL protocol
Browse files Browse the repository at this point in the history
- missing colon (`:`) at irc
- adding irc, sftp and ftps
  • Loading branch information
albert-github committed Dec 11, 2020
1 parent 979ea24 commit ea5650c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/doctokenizer.l
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ ATTRNAME [a-z_A-Z\x80-\xFF][:a-z_A-Z0-9\x80-\xFF\-]*
ATTRIB {ATTRNAME}{WS}*("="{WS}*(("\""[^\"]*"\"")|("'"[^\']*"'")|[^ \t\r\n'"><]+))?
URLCHAR [a-z_A-Z0-9\!\~\,\:\;\'\$\?\@\&\%\#\.\-\+\/\=]
URLMASK ({URLCHAR}+([({]{URLCHAR}*[)}])?)+
URLPROTOCOL ("http:"|"https:"|"ftp:"|"file:"|"news:"|"irc")
URLPROTOCOL ("http:"|"https:"|"ftp:"|"ftps:"|"sftp:"|"file:"|"news:"|"irc:"|"ircs:")
FILESCHAR [a-z_A-Z0-9\\:\\\/\-\+&#@]
FILEECHAR [a-z_A-Z0-9\-\+&#@]
HFILEMASK ("."{FILESCHAR}*{FILEECHAR}+)+
Expand Down
3 changes: 2 additions & 1 deletion src/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6686,7 +6686,8 @@ bool isURL(const QCString &url)
{
QCString loc_url = url.stripWhiteSpace();
return loc_url.left(5)=="http:" || loc_url.left(6)=="https:" ||
loc_url.left(4)=="ftp:" || loc_url.left(5)=="file:";
loc_url.left(4)=="ftp:" || loc_url.left(5)=="ftps:" || loc_url.left(5)=="sftp:" ||
loc_url.left(5)=="file:";
}
/** Corrects URL \a url according to the relative path \a relPath.
* Returns the corrected URL. For absolute URLs no correction will be done.
Expand Down

0 comments on commit ea5650c

Please sign in to comment.