FarCry 7.2.9: Injecting dmImage code into dmNews entries fails


#1

Hi all,

I guess I found a bug in FarCry 7.2.9 but would be glad if anybody could verify first.

As everything is responsive today, I came up with the following code for an dmImage display handler:

<cfsetting enablecfoutputonly="true" />
<cfoutput>
	<figure>
		<picture>
			<source srcset="#application.url.webroot##stObj.thumbnailImage#" media="(max-width: 680px)">
			<source srcset="#application.url.webroot##stObj.standardImage#">
			<img src="#application.url.webroot##stObj.standardImage#"
				 alt="#application.fc.lib.esapi.encodeForHTMLAttribute(stObj.alt)# #application.fc.lib.esapi.encodeForHTMLAttribute(stObj.copyrightNotice)#"/>
		</picture>
		<figcaption>
			<p>#application.fc.lib.esapi.encodeForHTMLAttribute(stObj.alt)#</p>
			<p class="credit">#application.fc.lib.esapi.encodeForHTMLAttribute(stObj.copyrightNotice)#</p>	
		</figcaption>
	</figure>
</cfoutput>
<cfsetting enablecfoutputonly="false" />

However, when I inject the code with the TinyMCE editor, what I get is:

<figure><source media="(max-width: 680px)" /> <source /> <img src="/merker/images/dmImage/StandardImage/SF-Mozart-LaClemenzaDiTito-Schultz-Gansch-Crebassa-DeBique-Thomas-680x400-201707271.jpg" border="0" alt="»La clemenza di Tito«, 1. Akt: Vitellia (Golda Schultz), Servilia (Christina Gansch), Sesto (Marianne Crebassa) und Annio (Jeanine de Bique) mit Tito (Russell Thomas). © Salzburger Festspiele/Ruth Walz" /> <figcaption> <p>»La clemenza di Tito«, 1. Akt: Vitellia (Golda Schultz), Servilia (Christina Gansch), Sesto (Marianne Crebassa) und Annio (Jeanine de Bique) mit Tito (Russell Thomas).</p> <p class="credit">© Salzburger Festspiele/Ruth Walz</p> </figcaption></figure>

As you can see, the srcset attributes and picture tags are omitted, and the <img> tag gets an additional but outdated border attribute.

Am I the first one to experience this behavior? Is there a fix, or am I overlooking something? Any pointers will be appreciated.


#2

TinyMCE removes any attributes or tags it doesn’t recognize. If you want to
use anything unusual you will need to customise the config.

Blair


#3

Blair,

Your reply confirms my thoughts (although I cannot find “anything unusual” by using standardized and perfectly valid HTML5 tags and attributes). Oh, what fun…

I’ll try and see where and how to alter the the TinyMCE config.

Thanks,
Thomas