We need to limit the content in Tridion to 160 characters. We don't have a period at the end of the second sentence which puts our content at exactly 160 characters. However, Tridion is inserting a blank space at the end of the second sentence. How can we remove this space?
I decided to try to give you a generic answer to your generic question. Not because of giving a solution to a problem, but to try to explain where change in content can happen.
Generally, mismatch can happen at 3 stages:
- during saving of the component
- during publishing (rendering) of the component
- during presenting (querying) of content
Related to first case, if you enter one string, and another is saved, then this can be caused either by XSLT which edits (formats) your content pre-save, or by some event system which also edits component during save. You should take a look at both.
Related to second case, there is option that your content is not rendered properly. It is possible that your output during rendering is having blank space if you for example missed it in dwt, or in JSON or XML output, depending on your concrete implementation. For this to fix, you should compare content in saved component to an output and make sure that whats in component is shown as a result of templating.
Third case happens when you have published correct output as a result of component presentation, but on your website it's presented faultily. It can happen for example if you use DXA, have a correct model, but your view has an extra space somewhere. For you to debug this, you need to check what's published in broker database, filesystem or somewhere else to what's presented on website.
In any case, debugging these issues is kind of where the fun of working with Tridion lies. Based on the info which you provided, where you stated that you have a constrain where its not possible to add more that 160 chars in some text field, it looks to me like you have an event system which is not working correctly, or some custom XSLT, so please start from there.