<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>21700</bug_id>
          
          <creation_ts>2013-04-15 08:38:04 +0000</creation_ts>
          <short_desc>spec &quot;strip possibly dangerous content before inserting rich text paste markup&quot;</short_desc>
          <delta_ts>2014-11-05 15:57:50 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>HISTORICAL - Clipboard API and events</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P1</priority>
          <bug_severity>critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Hallvord R. M. Steen">hsteen</reporter>
          <assigned_to name="Hallvord R. M. Steen">hsteen</assigned_to>
          <cc>bugs</cc>
    
    <cc>dghrjyan</cc>
    
    <cc>hsivonen</cc>
    
    <cc>mike</cc>
    
    <cc>Tobias-Braun1004</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>86206</commentid>
    <comment_count>0</comment_count>
    <who name="Hallvord R. M. Steen">hsteen</who>
    <bug_when>2013-04-15 08:38:04 +0000</bug_when>
    <thetext>If the default action of a paste event is not prevented, the target element of the paste action supports rich text editing, and there is formatted textual data on the clipboard, the implementation must remove 

* SCRIPT element
* javascript: URLs
* on...=&quot;&quot; event handler attributes

before pasting.

Or something like that.. At least IE&amp;Chrome already do this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86207</commentid>
    <comment_count>1</comment_count>
    <who name="Hallvord R. M. Steen">hsteen</who>
    <bug_when>2013-04-15 08:40:13 +0000</bug_when>
    <thetext>http://www.w3.org/mid/F27C10D5-EF26-44D5-A82D-3A5B3487D0B8@apple.com</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86388</commentid>
    <comment_count>2</comment_count>
    <who name="Henri Sivonen">hsivonen</who>
    <bug_when>2013-04-19 13:55:50 +0000</bug_when>
    <thetext>(In reply to comment #0)
&gt; the implementation must remove 
&gt; 
&gt; * SCRIPT element
&gt; * javascript: URLs
&gt; * on...=&quot;&quot; event handler attributes

Blacklisting is the wrong way to write sanitizers.

Gecko uses whitelisting:
http://mxr.mozilla.org/mozilla-central/source/content/base/src/nsTreeSanitizer.cpp</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111156</commentid>
    <comment_count>3</comment_count>
    <who name="Hallvord R. M. Steen">hsteen</who>
    <bug_when>2014-09-08 08:47:09 +0000</bug_when>
    <thetext>Does WebKit *actually* remove unknown properties from pasted markup? I don&apos;t know off the top of my head if it&apos;s using a whitelist or blacklist approach.

Ideally, I could just reference an algorithm to generate &quot;safe&quot; markup somewhere else..</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>