I'm guessing I could output my content to a variable, then just strip any tilde's from the variable before displaying it, but does anyone know why Umbraco is doing this, and any way it can be overridden?
I think the tilde is there all the time (in content from the WYSIWYG) - you're just replacing around it, so to speak - why not include it in the replace?
xslt generating tilde "~" in replaced url
Hi all.
I'm having to parse some RTE entered content and amend any references to media paths to include the entire site path
<xsl:value-of select="umbraco.library:Replace(bodyText, '/media/', 'http://www.mysite.com/media/')" disable-output-escaping="yes" />
however, for some reason its adding a tilde at the start when rendering, so I get
<img src="~http://www.mysite.com/media/blahblah.jpg" />
and no images appearing.
I'm guessing I could output my content to a variable, then just strip any tilde's from the variable before displaying it, but does anyone know why Umbraco is doing this, and any way it can be overridden?
Cheers
Shaun
Hi Shaun,
I think the tilde is there all the time (in content from the WYSIWYG) - you're just replacing around it, so to speak - why not include it in the replace?
/Chriztian
aah. I couldn 't see the tilde in the WYSIWYG html, so had assumed it was something generated by the xslt itself.
I've included it in the replace and its working brilliantly.
Cheers Chriztian.
is working on a reply...