OSDN Git Service

&と”が余分にサニタイジングされる不具合の修正
authorh677 <h677>
Sat, 29 Mar 2008 01:38:48 +0000 (01:38 +0000)
committerh677 <h677>
Sat, 29 Mar 2008 01:38:48 +0000 (01:38 +0000)
MojuUtils.pas

index cef34b1..4c87fb0 100644 (file)
@@ -377,13 +377,15 @@ begin
        end;
 end;
 
-//! \96³\8aQ\89»(& -> &amp; " -> &auot; \82É\95Ï\8a·\82·\82é)
+//! \96³\8aQ\89»(& -> &amp; " -> &quot; \82É\95Ï\8a·\82·\82é)
 function Sanitize(const s: String): String;
 begin
-       Result := CustomStringReplace(s, '&', '&amp;');
+    // \97]\95ª\82É\83T\83j\83^\83C\83Y\82³\82ê\82È\82¢\82æ\82¤\82É\82¢\82Á\82½\82ñ\8c³\82É\96ß\82·
+    Result := UnSanitize(s);
+       Result := CustomStringReplace(Result, '&', '&amp;');
        Result := CustomStringReplace(Result, '"', '&quot;');
 end;
-//! \96³\8aQ\89»\89ð\8f\9c(&amp; -> & &auot; -> " \82É\95Ï\8a·\82·\82é)
+//! \96³\8aQ\89»\89ð\8f\9c(&amp; -> & &quot; -> " \82É\95Ï\8a·\82·\82é)
 function UnSanitize(const s: String): String;
 begin
        Result := CustomStringReplace(s, '&quot;', '"');