OSDN Git Service

ttps://~のURLをリンク対象に追加
authorzako <zako@users.sourceforge.jp>
Sun, 25 May 2014 10:36:45 +0000 (19:36 +0900)
committerzako <zako@users.sourceforge.jp>
Sun, 25 May 2014 10:36:45 +0000 (19:36 +0900)
HTMLCreate.pas

index ce950e1..79f8840 100644 (file)
@@ -49,8 +49,8 @@ type
                pANCHORs, pANCHORe  : PChar;
                pCTAGLs,  pCTAGLe   : PChar;
                pCTAGUs,  pCTAGUe   : PChar;
-               pREF_MARKSs : array[0..9] of PChar;
-               pREF_MARKSe : array[0..9] of PChar;
+               pREF_MARKSs : array[0..10] of PChar;
+               pREF_MARKSe : array[0..10] of PChar;
                constructor Create;
 
                function AddBeProfileLink(AID : string; ANum: Integer):string ;
@@ -112,8 +112,8 @@ const
        CLOSE_TAGAL = '</a>';
        CLOSE_TAGAU = '</A>';
        RES_REF                 = '&gt;&gt;';
-       REF_MARK: array[0..9] of string = ('http://', 'ttp://', 'tp://',
-                                                                        'ms-help://','p://', 'https://',
+       REF_MARK: array[0..10] of string = ('http://', 'ttp://', 'tp://',
+                                                                        'ms-help://','p://', 'https://', 'ttps://',
                                                                         'www.', 'ftp://','news://','rtsp://');
 
 constructor THTMLCreate.Create;
@@ -130,7 +130,7 @@ begin
        pCTAGLe   := pCTAGLs + 4;
        pCTAGUs   := PChar(CLOSE_TAGAU);
        pCTAGUe   := pCTAGUs + 4;
-       for j := 0 to 9 do begin
+       for j := 0 to 10 do begin
                pREF_MARKSs[j] := PChar(REF_MARK[j]);
                pREF_MARKSe[j] := pREF_MARKSs[j] + Length(REF_MARK[j]);
        end;
@@ -262,8 +262,8 @@ end;
  *************************************************************************)
 procedure THTMLCreate.AddAnchorTag(PRes: PResRec);
 const
-       _HEAD : array[0..9] of String =
-               ('', 'h', 'ht', '', 'htt', '', 'http://', '', '', '');
+       _HEAD : array[0..10] of String =
+               ('', 'h', 'ht', '', 'htt', '', 'h', 'http://', '', '', '');
 var
        url: string;
        href: string;
@@ -285,7 +285,7 @@ begin
                pp := PChar(s);
                pe := pp + Length(s);
 
-               for j := 0 to 9 do begin
+               for j := 0 to 10 do begin
                        pos := AnsiStrPosEx(pp, pe, pREF_MARKSs[j], pREF_MARKSe[j]);
                        if pos <> nil then begin
                                tmp := pos - pp + 1;