News:

Wondering if this will always be free?  See why free is better.

Main Menu

Image display within html tags bug

Started by SDMiller, January 20, 2015, 10:57:57 PM

Previous topic - Next topic

SDMiller

You can see the bug in action here:
http://mahjong.us.com/forum/index.php?topic=262.msg377#msg377

In that example post, the first image tag's actual source code:
src="http://www.mahjongnews.com/en/images/stories/tournaments/MCR/mcrCopenhagen2015.jpg"

gets corrupted in the final displayed webpage to:
http://www.mahjongnews.com/en/images/stories/tournaments/%3Cspan%20class=

Even though that is not the actual source for that image. Oddly enough, this same exact image source, when displayed in the preview of the post editor, shows up correctly. It also shows up correctly on the simpleportal front page which you can see in action here:
http://mahjong.us.com/forum/index.php

yet,

As you can see in that example webpage, the second image tag (or any number of subsequent image tags), which is calling in the exact same directory as the first, displays just fine.

This error is consistently reproduced in ALL of my posts on my boards which make remote (images from online sources other than my own directory) image source calls, which can be observed here:
http://mahjong.us.com/forum/index.php/board,47.0.html


So, in summery:
The bug affects remote image sources.
The bug only affects the first image in a post.
The bug doesn't affect the exact same page's image as it appears in the preview panel, or when displayed on the simpleportal front page.

Thank you

Scott

Kindred

Please include, in code tags, the full contents (as originally typed) of that corrupted post.

Also, let us know your smf version and what mods thatbyou have installed...

Because I can not seem to replicate that issue here or on my own test site.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

SDMiller

[html]<p><img class="caption" style="margin: 5px; border: 1px solid #000000;" title="Mikkel Askjær Friis (2nd), Isabel Bahiano Steenholm (1st),  and Henrik Leth (3rd)." src="http://www.mahjongnews.com/en/images/stories/tournaments/MCR/mcrCopenhagen2015.jpg" alt="mcrCopenhagen2015" width="95%" height="NaN" /></p>
<p>COPENHAGEN, Denmark 18 January 2015- Following a close competition, Isabel Bahiano Steenholm wins the MCR Copenhagen Open 2015, followed by Mikkel Askjær-Friis in second and Henrik Leth in third.</p>
[/html]
Written by Frank Rostved and Karin Andersson.
[cutoff]
[html]
<p>T<span style="color: #10131b;">he sixth and last session </span><span style="color: #10131b;">of the competition </span><span style="color: #10131b;">proved to be</span> decisive. At this point <span style="color: #10131b;">six people could still win. </span><span style="color: #10131b;">Additionally,</span> the top-three players after the fifth session, Isabel Bahiano Steenholm, Mikkel Askjær-Friis and Jesper Nøhr, were seated against each other at the same table. The runner-up Mikkel Askjær-Friis safely secured four table points in this last session, but Isabel Baihano Steenholm was able to keep the lead securing two table points, pushing Jesper Nøhr far away from the podium.</p>
<p>The team competition was won by The Hubits – Fellowships of the Tiles.</p>
<p>The level of the competition was high, no one was way ahead in front with maximum points, and no one stayed in bottom with only zero's.</p>
<p><img class="caption" style="border: 1px solid #000000; margin: 5px;" title="Team winners: Morten Andersen, Claes Schütt, Sheila Hansen, and Jesper Nøhr." src="http://www.mahjongnews.com/en/images/stories/tournaments/MCR/mcrCopenhagen2015-team.jpg" alt="mcrCopenhagen2015 team" width="100%" height="NaN" /></p>
<p><strong><span style="font-size: 1em;">Final standings of the MCR Copenhagen Open 2015</span></strong></p>
<table id="table1" style="width: 100%;" border="1">
<thead>
<tr><th class="sort_header">Place</th><th class="sort_header">First</th><th class="sort_header">Last</th><th class="sort_header">Ntl</th><th class="sort_header">TP</th><th class="sort_header">Points</th></tr>
</thead>
<tbody>
<tr style="height: 14.0pt;">
<td class="xl65" style="height: 14.0pt; width: 34pt;" width="34" height="14">1</td>
<td style="width: 84pt;" width="84">Isabel Bahiano</td>
<td style="width: 72pt;" width="72">Steenholm</td>
<td class="xl65" style="width: 48pt;" width="48">DK</td>
<td class="xl65" style="width: 59pt;" width="59">17</td>
<td class="xl65" style="width: 35pt;" width="35">248</td>
</tr>
<tr style="height: 14.0pt;">
<td class="xl65" style="height: 14.0pt;" height="14">2</td>
<td>Mikkel</td>
<td>Askjær-Friis</td>
<td class="xl65">DK</td>
<td class="xl65">16</td>
<td class="xl65">582</td>
</tr>
<tr style="height: 14.0pt;">
<td class="xl65" style="height: 14.0pt;" height="14">3</td>
<td>Henrik</td>
<td>Leth</td>
<td class="xl65">DK</td>
<td class="xl65">14</td>
<td class="xl65">461</td>
</tr>
<tr style="height: 14.0pt;">
<td class="xl65" style="height: 14.0pt;" height="14">4</td>
<td>Jonas</td>
<td>Hagerlid</td>
<td class="xl65">SE</td>
<td class="xl65">14</td>
<td class="xl65">187</td>
</tr>
<tr style="height: 14.0pt;">
<td class="xl65" style="height: 14.0pt;" height="14">5</td>
<td>Morten</td>
<td>Andersen</td>
<td class="xl65">DK</td>
<td class="xl65">13</td>
<td class="xl65">45</td>
</tr>
<tr style="height: 14.0pt;">
<td class="xl65" style="height: 14.0pt;" height="14">6</td>
<td>Sheila</td>
<td>Hansen</td>
<td class="xl65">DK</td>
<td class="xl65">12.5</td>
<td class="xl65">293</td>
</tr>
<tr style="height: 14.0pt;">
<td class="xl65" style="height: 14.0pt;" height="14">7</td>
<td>Brian</td>
<td>Krog</td>
<td class="xl65">DK</td>
<td class="xl65">12.5</td>
<td class="xl65">-36</td>
</tr>
<tr style="height: 14.0pt;">
<td class="xl65" style="height: 14.0pt;" height="14">8</td>
<td>Jesper</td>
<td>Nøhr</td>
<td class="xl65">DK</td>
<td class="xl65">12</td>
<td class="xl65">448</td>
</tr>
<tr style="height: 14.0pt;">
<td class="xl65" style="height: 14.0pt;" height="14">9</td>
<td>Camilla</td>
<td>Dalsgaard</td>
<td class="xl65">DK</td>
<td class="xl65">12</td>
<td class="xl65">279</td>
</tr>
<tr style="height: 14.0pt;">
<td class="xl65" style="height: 14.0pt;" height="14">10</td>
<td>Gérard</td>
<td>Hêche</td>
<td class="xl65">CH</td>
<td class="xl65">12</td>
<td class="xl65">97</td>
</tr>
<tr style="height: 14.0pt;">
<td class="xl65" style="height: 14.0pt;" height="14">11</td>
<td>Luc</td>
<td>Humbert</td>
<td class="xl65">CH</td>
<td class="xl65">12</td>
<td class="xl65">-33</td>
</tr>
<tr style="height: 14.0pt;">
<td class="xl65" style="height: 14.0pt;" height="14">12</td>
<td>Claes</td>
<td>Schütt</td>
<td class="xl65">DK</td>
<td class="xl65">11</td>
<td class="xl65">61</td>
</tr>
<tr style="height: 14.0pt;">
<td class="xl65" style="height: 14.0pt;" height="14">13</td>
<td>Annika</td>
<td>Ridell</td>
<td class="xl65">SE</td>
<td class="xl65">11</td>
<td class="xl65">-128</td>
</tr>
<tr style="height: 14.0pt;">
<td class="xl65" style="height: 14.0pt;" height="14">14</td>
<td>Shi Hua</td>
<td>Chen</td>
<td class="xl65">DK</td>
<td class="xl65">10.5</td>
<td class="xl65">47</td>
</tr>
<tr style="height: 14.0pt;">
<td class="xl65" style="height: 14.0pt;" height="14">15</td>
<td>Robert Bonde</td>
<td>Jensen</td>
<td class="xl65">DK</td>
<td class="xl65">9</td>
<td class="xl65">-49</td>
</tr>
<tr style="height: 14.0pt;">
<td class="xl65" style="height: 14.0pt;" height="14">16</td>
<td>Freddy</td>
<td>Christiansen</td>
<td class="xl65">DK</td>
<td class="xl65">9</td>
<td class="xl65">-198</td>
</tr>
<tr style="height: 14.0pt;">
<td class="xl65" style="height: 14.0pt;" height="14">17</td>
<td>Jacob</td>
<td>Petersen</td>
<td class="xl65">DK</td>
<td class="xl65">8.5</td>
<td class="xl65">-311</td>
</tr>
<tr style="height: 14.0pt;">
<td class="xl65" style="height: 14.0pt;" height="14">18</td>
<td>Kim</td>
<td>Iversen</td>
<td class="xl65">DK</td>
<td class="xl65">8</td>
<td class="xl65">10</td>
</tr>
<tr style="height: 14.0pt;">
<td class="xl65" style="height: 14.0pt;" height="14">19</td>
<td>Ildikó</td>
<td>Hargitai</td>
<td class="xl65">HU</td>
<td class="xl65">8</td>
<td class="xl65">-220</td>
</tr>
<tr style="height: 14.0pt;">
<td class="xl65" style="height: 14.0pt;" height="14">20</td>
<td>Tina</td>
<td>Christensen</td>
<td class="xl65">DK</td>
<td class="xl65">8</td>
<td class="xl65">-332</td>
</tr>
<tr style="height: 14.0pt;">
<td class="xl65" style="height: 14.0pt;" height="14">21</td>
<td>Petter</td>
<td>Ranefall</td>
<td class="xl65">SE</td>
<td class="xl65">7</td>
<td class="xl65">-232</td>
</tr>
<tr style="height: 14.0pt;">
<td class="xl65" style="height: 14.0pt;" height="14">22</td>
<td>Karin</td>
<td>Andersson</td>
<td class="xl65">DK</td>
<td class="xl65">7</td>
<td class="xl65">-394</td>
</tr>
<tr style="height: 14.0pt;">
<td class="xl65" style="height: 14.0pt;" height="14">23</td>
<td>Moa</td>
<td>Henriet</td>
<td class="xl65">SE</td>
<td class="xl65">5</td>
<td class="xl65">-310</td>
</tr>
<tr style="height: 14.0pt;">
<td class="xl65" style="height: 14.0pt;" height="14">24</td>
<td>Sune</td>
<td>Thomsen</td>
<td class="xl65">DK</td>
<td class="xl65">3</td>
<td class="xl65">-328</td>
</tr>
</tbody>
</table>
[/html]


SMF 2.0.9 | SMF © 2014, Simple Machines
SimplePortal 2.3.6 © 2008-2014, SimplePortal

1.   SMF 2.0.1 Update   1.0
2.   SMF 2.0.2 Update   1.0
3.   SMF 2.0.3 Update   1.0
4.   Stop Spammer   2.3.9
5.   httpBL   2.5.1
6.   Sneaky Editing   1.1
7.   Glossary   0.3.1
8.   Ohara YouTube Embed
9.   SMF 2.0.4 Update
10.   Peoplesign   1.6
11.   Add IP2Location to Track IP   1.3
12.   SMF 2.0.5 Update   1.0
13.   SMF 1.1.19 / 2.0.6 Update   1.0
14.   SMF 2.0.7 Update   1.0
15.   More Spiders   1.2
16.   Groups See Hidden Users   1.0 (not installed)
17.   Register At Post View v.1.2   1.2
18.   Quick Spoiler   0.9.4
19.   Move recent to the top (not installed)
20.   Anti-Spam Links   1.0.1
21.   SMF 2.0.8 Update   1.0
22.   SMF 1.1.20 / 2.0.9 Update   1.0
23.   SimplePortal   2.3.6
24.   Float BBCODE   1.0.2

SDMiller

I have no idea how this solution came to me... it just popped into my head whilst consternating profusely.

Considering it only affects the first image, and trying to think what SMF might do to the first image it doesn't do to any others... I remembered that Glossary only highlights the first iteration of a glossary term found in a post... and remembering that MCR is a glossary term relevant to all my posts and images... on a hunch I added this tag to my posts:
<!-- MCR -->

And voila, problem solved.

So not a bug... for SMF, it's a bug for Glossary Mod.

Glossary Mod should more properly ignore any text within a bbl or html bracket. I can work around that easy enough with comment codes for any glossary terms which might happen to appear in any image tags.

Thanks for taking a look at it. Hopefully the knowledge gained has bettered mankind in some fashion we may not appreciate for generations to come. :P

Advertisement: