Here is my second attempt to push this patch. The changes since last time are: - The global code structure follows Nicolas George suggestions, with an if-else statement. - The silent truncate has been fixed: tag name length is not arbitrarily limited anymore. - The fate broken test has been updated