Figure 2. Preventing XSS through use of inherently safe APIs. (a) Replacing ad-hoc concatenation of HTML markup with a strict template. (b) A safe wrapper API. (c) Using a type to represent safe HTML markup.
รูปที่ 2 การป้องกัน xss เนื้อแท้ปลอดภัยผ่านการใช้ APIs . ( A ) แทนที่เรียงต่อกันของ HTML มาร์กกับแม่แบบเข้มงวด . ( b ) การห่อปลอดภัย API . ( c ) การใช้ชนิดของมาร์กอัป HTML ปลอดภัย