Fix EZP-21446: Limit for object name trim adds +1

Link: https://jira.ez.no/browse/EZP-21446

# Description
When trimming object name, the number of char had an extra one.

# Test
Manual test and updated test suite.