U4-10016 - toAscii might replace the entire url with an empty one, making the url non existant

Created by Mikkel Holck Madsen 14 Jun 2017, 06:33:34 Updated by Mikkel Holck Madsen 14 Jun 2017, 08:13:10

Relates to: U4-3732

Subtask of: U4-9609

When you set toAscii to true, you can end up in situations where the entire name is replaced by something that cant be converted to ascii, like chinese charachers.

The code will start by doing a toAscii on the name, like 最新动态, which then returns something like ????, where we then replace illigal charachers like ? making the url end up empty!

Comments

Mikkel Holck Madsen 14 Jun 2017, 06:43:59

The branch temp-tryAscii has been submitted by @zpqrtbnk, which allows the setting toAscii to be set to "try". It will then do the ascii convertion, and if for some reason it hits charachers it cant convert, it will just use the original one.

The the example, it would mean that the url will be '最新动态', which is ok, as chinese cant be ascii encoded.


Mikkel Holck Madsen 14 Jun 2017, 07:15:37

Examples with this implemented:

Name: 'ÆØÅ and æøå and 中文测试 and אודות האתר and größer page' ||toAscii||result|| |try|æøå-and-æøå-and-中文测试-and-אודות-האתר-and-größer-page| |true|aeoa-and-aeoa-and-and-and-grosser-page| |false(default)|æøå-and-æøå-and-中文测试-and-אודות-האתר-and-größer-page|

Name: '最新动态' ||toAscii||result|| |try|最新动态| |true| | |false(default)|最新动态|


Mikkel Holck Madsen 14 Jun 2017, 07:25:07

PR: https://github.com/umbraco/Umbraco-CMS/pull/1999


Mikkel Holck Madsen 14 Jun 2017, 08:12:46

Updated the docs here: https://github.com/umbraco/UmbracoDocs/commit/679d4358c2e264644e8c4085ae92feb176e3bb74 and merged the PR


Priority: Normal

Type: Task

State: Fixed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.6.0

Due in version: 7.6.4

Sprint:

Story Points:

Cycle: 2