Skip to content

Instantly share code, notes, and snippets.

@campaignupgrade
Created January 2, 2018 21:05
Show Gist options
  • Save campaignupgrade/23f661de18a93c54da861fd6a4829683 to your computer and use it in GitHub Desktop.
Save campaignupgrade/23f661de18a93c54da861fd6a4829683 to your computer and use it in GitHub Desktop.
Source Joomla website renders correctly:
http://www.truth-out.org/article/item/42794
In Joomla content in MySQL before export:
<div><span class="wf_caption" style="display: block; max-width: 640px; width: 100%;"><img src="http://www.truth-out.org/images/Images_2017_12/2017_1204td1.jpg" alt="(Image: Muhammad Ansi, Untitled (Pier), 2016.)" width="640" style="width: 100%; margin: auto;" /><span style="margin-top: 3px; display: block;">(Image: <a href="https://www.artfromguantanamo.com/muhammad-ansi-1/" >Muhammad Ansi</a>, Untitled [Pier], 2016.)</span></span></div>
<div>&nbsp;</div>
In XML export file:
<field name="post_content">&lt;div&gt;&lt;span class=&quot;wf_caption&quot; style=&quot;display: block; max-width: 640px; width: 100%;&quot;&gt;&lt;img src=&quot;http://www.truth-out.org/images/Images_2017_12/2017_1204td1.jpg&quot; alt=&quot;(Image: Muhammad Ansi, Untitled (Pier), 2016.)&quot; width=&quot;640&quot; style=&quot;width: 100%; margin: auto;&quot; /&gt;&lt;span style=&quot;margin-top: 3px; display: block;&quot;&gt;(Image: &lt;a href=&quot;https://www.artfromguantanamo.com/muhammad-ansi-1/&quot; &gt;Muhammad Ansi&lt;/a&gt;, Untitled [Pier], 2016.)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
In WordrPress after WPAllImport:
<div><span class=&quot;wf_caption&quot; style=&quot;display: block; max-width: 640px; width: 100%;&quot;><img src=&quot;http://www.truth-out.org/images/Images_2017_12/2017_1204td1.jpg&quot; alt=&quot;(Image: Muhammad Ansi, Untitled (Pier), 2016.)&quot; width=&quot;640&quot; style=&quot;width: 100%; margin: auto;&quot; /><span style=&quot;margin-top: 3px; display: block;&quot;>(Image: <a href=&quot;https://www.artfromguantanamo.com/muhammad-ansi-1/&quot; >Muhammad Ansi</a>, Untitled [Pier], 2016.)</span></span></div>
<div>&nbsp;</div>
WPAllImport has correctly converted the XML's &lt; and &gt; to < and > but is failing to convert &quot; to ".
Images and inline styles are broken in the WordPress HTML (ignore the Featured Image at the top, that's not an image in the body):
https://truthout4-dev.stackstar.com/articles/the-art-of-keeping-guantanamo-open-what-the-paintings-by-its-prisoners-tell-us-about-our-humanity-and-theirs/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment