[ticket/12039] Allow getting the value without a new line at the end

PHPBB3-12039