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

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>137881</bug_id>
          
          <creation_ts>2014-10-20 07:48:57 -0700</creation_ts>
          <short_desc>Assigning .innerHTML should give a warning when invalid markup is ignored</short_desc>
          <delta_ts>2022-08-18 16:01:12 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Shad Sterling">me</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>ap</cc>
    
    <cc>bburg</cc>
    
    <cc>bfulgham</cc>
    
    <cc>cdumez</cc>
    
    <cc>greggy</cc>
    
    <cc>joepeck</cc>
    
    <cc>pangle</cc>
    
    <cc>rniwa</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1042811</commentid>
    <comment_count>0</comment_count>
    <who name="Shad Sterling">me</who>
    <bug_when>2014-10-20 07:48:57 -0700</bug_when>
    <thetext>if you call document.getElementById(&quot;someid&quot;).innerHTML = htmlString when htmlString contains malformed tags, the malformed
tags are silently dropped.

For example, http://jsbin.com/qikeha/2/edit?html,console,output

This should not be silent, a warning should be logged.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1043094</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2014-10-20 21:00:41 -0700</bug_when>
    <thetext>Sounds like a good idea to me!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1043103</commentid>
    <comment_count>2</comment_count>
    <who name="Shad Sterling">me</who>
    <bug_when>2014-10-20 21:42:19 -0700</bug_when>
    <thetext>The example URL in comment 0 fails to illustrate the problem.  In that example, nothing is actually dropped, what is intended as the second paragraph is taken to be part of a property on the &lt;p&gt; tag.  To get the second paragraph to disappear, the third paragraph must be omitted.

Here&apos;s an updated example: http://jsbin.com/qikeha/4/edit?html,console,output</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1889862</commentid>
    <comment_count>3</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-08-08 17:19:57 -0700</bug_when>
    <thetext>I am not sure on web-spec but all browsers (Chrome Canary 106, Firefox Nightly 105 and Safari 15.6 on macOS 12.5) and does not show any warning in console on comment saying there should be a warning before and after this?

Appreciate if someone can comment aligned with web-spec whether it is something to be discussed in WHATWG Github or something since all agree to mark as &quot;RESOLVED WONTFIX&quot;? Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1892316</commentid>
    <comment_count>4</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2022-08-18 16:01:12 -0700</bug_when>
    <thetext>This is not a web spec matter, and still seems like a good idea to me.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>