I have a problem with some content I am sending to a Jive community by email showing up mangled in the web interface and in the outgoing message notifications. The community is running the advancedemail plgin, but I have been told that is not relevant for this problem.
Here is the (sanitized) message I sent:
From: Jochem van Dieten <email>
User-Agent: Thunderbird 2.0.0.21 (Windows/20090302)
MIME-Version: 1.0
To: <community>
Subject: code block test
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam sapien
mi, lobortis sed viverra eget, viverra quis leo. Fusce accumsan velit
non turpis sollicitudin ut lacinia elit vestibulum. Pellentesque
habitant morbi tristique senectus et netus et malesuada fames ac turpis
egestas. Etiam adipiscing justo et ipsum egestas id pulvinar tortor
lobortis.
private function foo(event:Event):bar {
for (var i = 0; i < event.length; i++) {
_foobar_ = _foobar_ *i* event[i];
}
}
Suspendisse potenti. Ut ipsum elit, bibendum nec tempor et, ornare a
ligula. Proin sit amet turpis quis justo dictum hendrerit. Mauris
tincidunt nunc mauris. Mauris in ipsum justo. Vestibulum nec nisi libero.
Jochem
--
Jochem van Dieten
http://jochem.vandieten.net/
The third line of the code is altered by the system. Here is a screenshot of the way it showed in the web interface:
Is there any documentation available on these formatting codes and how we can send code fragments through email without the system changing the code?
Hi,
I have investigated this, and it looks like we actually do run the code through a method which uses our older wiki syntax to convert the text into our format. I believe this is undocumented (still looking) but here is how to get around this:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam sapien
mi, lobortis sed viverra eget, viverra quis leo. Fusce accumsan velit
non turpis sollicitudin ut lacinia elit vestibulum. Pellentesque
habitant morbi tristique senectus et netus et malesuada fames ac turpis
egestas. Etiam adipiscing justo et ipsum egestas id pulvinar tortor
lobortis.
{code}
private function foo(event:Event):bar {
for (var i = 0; i < event.length; i++) {
_foobar_ = _foobar_ *i* event[i];
}
}
{code}
Suspendisse potenti. Ut ipsum elit, bibendum nec tempor et, ornare a
ligula. Proin sit amet turpis quis justo dictum hendrerit. Mauris
tincidunt nunc mauris. Mauris in ipsum justo. Vestibulum nec nisi libero.
Jochem
And it will turn out like this, with the code unaltered:
Hope that helps! I'll look into the documentation, and plans for this functionality in the future
Will wrote on 2009-05-13 20:30:
I have investigated this, and it looks like we actually do run the code through a method which uses our older wiki syntax to convert the text into our format. I believe this is undocumented (still looking) but here is how to get around this:
>>
>> private function foo(event:Event):bar {
>> for (var i = 0; i < event.length; i++) {
>> _foobar_ = _foobar_ *i* event+;
>> }
>> }
>>
Look closer at the second last characters of the third line. In the
source they are an array notation loop index, in the result they are a
plus sign. In a code forum this is a guarantee for problems.
Jochem
--
Jochem van Dieten
Ah yes, missed that one, I will do some further testing and get back to you
I have logged this as a bug: CS-13412 and it will be fixed in a future patch release
Will wrote on 2009-05-19 02:42:
I have logged this as a bug: CS-13412 and it will be fixed in a future patch release
Does that mean it will be backpatched as well? The forum I am interested
in is currently using CS 2.5.7.
Jochem
--
Jochem van Dieten
We do not offer patches for our defects, but instead put out a series of patch releases which just contain bug fixes. In order to have this resolved, you will need to just install the patch release which includes this fix. It is currently scheduled for our July patch release.
Will wrote on 2009-05-19 02:42:
I have logged this as a bug: CS-13412 and it will be fixed in a future patch release
Will the patch be just for the specific case of i or will it provide
a way to prevent any sort of replacement filter from running? Because
there are several more cases where the replacement functionality
provides unwanted results.
Jochem
--
Jochem van Dieten
Jive combines collaboration software, community software & social networking software into the leading SBS solution.
© Copyright 2000–2009 Jive Software. All rights reserved.
915 SW Stark St., Suite 400, Portland, OR 97205