Recent Topics

Does saving a post change the post

Started by on Apr 11, 2018 – Contents updated: May 31, 2018

Apr 11, 2018 21:57    

I am finding that saving a post, changes the post. Is this supposed to happen?
I was under the impression that post (and the related attributes) is the "model" and the renderers handled all the rendering transforming the model into the view (using MVC parlance).

I am finding that saving certain posts, alters the data of the document so when I load it in again the post is not what I originally entered. Examples of this include converting < into &lt;, or if I have a tag that the system thinks has been left over I end up with lots of reciprocal closing tags at the end of my post. My blog has lots of Java code samples which use generics and so lines like [ codeblock lang="java" ] List < ? > var1 = new LinkedList<String>(); [ /codeblock ] are common. So when I save the post and load it in again there are </String> s appended to the end of the post.

Is this on purpose? Or is it a bug? If it is intended behaviour, is there anyway to switch it off so that what I save is what I want to see next time I look at the page?

Apr 14, 2018 01:53

Escaping < is for security so that site visitors cannot inject malicious code into posts. Does this happen in your code blocks? Can you make screenshots?

Closing tags should not happen in codeblocks of course, we'll check this.

May 31, 2018 12:17

@davidnewcomb You have a wrong codeblock with space chars after [ and before ].
A correct codeblock must be like [codeblock lang="java"] List < ? > var1 = new LinkedList<String>(); [/codeblock].
Please see my test on the attached screenshot below:

Form is loading...

free blog software – This forum is powered by b2evolution CMS, a complete engine for your website.