<?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>261537</bug_id>
          
          <creation_ts>2023-09-13 16:49:35 -0700</creation_ts>
          <short_desc>Remove Quirk shouldDisableDataURLPaddingValidation for office.com</short_desc>
          <delta_ts>2024-08-20 15:51:59 -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>Safari 17</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>GoodFirstBug, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>261524</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Karl Dubost">karlcow</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1977389</commentid>
    <comment_count>0</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2023-09-13 16:49:35 -0700</bug_when>
    <thetext>A quirk has been created for solving Bug 261524
rdar://114573089
where Images do not show in Microsoft Word Online 


Step to Reproduce to check if the Quirk is not needed anymore.
0. Disable Site Specific Hacks on Safari
1. Go to https://www.office.com/launch/word?auth=1 (log in if not yet)
2. Open a Word Document
3. Insert Picture
4. Choose from This Device
5. Choose the picture 

Result:
We get an image in the document.

We SHOULD NOT get a placeholder where the  image was not added and there is a red X.


When this is failing.
The little icon HTML says “Image download failed.”:

```
&lt;img class=&quot;we_version2_CancelRequest_32x32x32&quot;
     unselectable=&quot;on&quot;
     role=&quot;presentation&quot;
     src=&quot;https://res-1.cdn.office.net:443/officeonline/we/s/h83987E0F63D43F20_resources/1033/we_version2.png&quot;
     alt=&quot;Image download failed.&quot;
     title=&quot;Image download failed.&quot;&gt;
```

The failure in the Console log is 

```
&gt; [Error] Failed to load resource: Data URL decoding failed (data:image/jpeg;base64,/9j…===, line 0)
```

Trying with a very small image.

```
[Error] Failed to load resource: Data URL decoding failed (data:image/png;base64,iVB…===, line 0)
[Error] Failed to load resource: Data URL decoding failed (data:image/png;base64,iVB…===, line 0)
[Error] WebSocket connection to &apos;wss://japaneast-pc01.augloop.office.com/&apos; failed: The operation couldn’t be completed. Operation timed out
	s8h (WordEditorDS.js:2688:104)
	f (WordEditorDS.js:3781:390)
…
```

The URL is:

```
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAECAYAAABGM/VAAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABXSURBVBhXDczBDUBAFADR+bsRCUERytKEslSgIhFEWBesDd8eJnmnkb6rVT4IPrC7A+cuDG+OSBlR8YYslmKmwbOMD+v8cGwf92mQtik0sRZRiQuPivIDbH4mQDUPORoAAAAASUVORK5CYII====
```


Reason:
This is failing because the padding at the end of the URL is wrong. `====`</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1977390</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-09-13 16:50:11 -0700</bug_when>
    <thetext>&lt;rdar://problem/115457624&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>