From d93afde0cafc20159e7c9dea0c31547671e2c17c Mon Sep 17 00:00:00 2001 From: h677 Date: Mon, 5 Oct 2009 14:23:13 +0000 Subject: [PATCH] =?utf8?q?refs=20#17840=20HTML=E5=8C=96=E3=81=97=E3=81=9F?= =?utf8?q?=E9=9A=9B=E3=81=AB=E3=80=81=E3=83=AC=E3=82=B9=E3=82=A2=E3=83=B3?= =?utf8?q?=E3=82=AB=E3=83=BC=E3=81=AE=E3=82=BF=E3=82=B0=E5=86=85=E3=81=A7?= =?utf8?q?=E3=80=81=E3=83=80=E3=83=96=E3=83=AB=E3=82=AF=E3=82=A9=E3=83=BC?= =?utf8?q?=E3=83=88=E3=81=8C=EF=BC=92=E3=81=A4=E3=81=A4=E3=81=AA=E3=81=8C?= =?utf8?q?=E3=82=8B=E4=B8=8D=E5=85=B7=E5=90=88=E3=81=AE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- HTMLCreate.pas | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/HTMLCreate.pas b/HTMLCreate.pas index 6cb422b..ce950e1 100644 --- a/HTMLCreate.pas +++ b/HTMLCreate.pas @@ -600,6 +600,7 @@ const _END: string = '&END='; var i, j, k: Integer; + hpos, qpos : Integer; tmp: string; res: string; begin @@ -627,10 +628,21 @@ begin end else begin k := LastDelimiter('/', tmp); Delete(tmp, 1, k); - if AnsiPos('-', tmp) < AnsiPos('"', tmp) then - Delete(tmp, AnsiPos('-', tmp), Length(tmp)) - else - Delete(tmp, AnsiPos('"', tmp), Length(tmp)); + hpos := AnsiPos('-', tmp); + qpos := AnsiPos('"', tmp); + if ( (hpos > 0) and (qpos > 0) ) then begin + if ( qpos < hpos ) then begin + Delete(tmp, qpos, Length(tmp)); + end else begin + Delete(tmp, hpos, Length(tmp)); + end; + end else begin + if ( qpos > 0 ) then begin + Delete(tmp, qpos, Length(tmp)); + end else if ( qpos > 0 ) then begin + Delete(tmp, hpos, Length(tmp)); + end; + end; PRes.FBody := PRes.FBody + ''; end; -- 2.11.0