Skip to content

#4612: Improve sanitizing column headers and description for datastore import#4613

Open
stefan-korn wants to merge 1 commit intoGetDKAN:2.xfrom
stefan-korn:4612-sanitzing-colum-names
Open

#4612: Improve sanitizing column headers and description for datastore import#4613
stefan-korn wants to merge 1 commit intoGetDKAN:2.xfrom
stefan-korn:4612-sanitzing-colum-names

Conversation

@stefan-korn
Copy link
Contributor

Fixes #4612

Describe your changes

QA Steps

  • Add manual QA steps in checklist format for a reviewer to perform. Be as specific as possible, provide examples if appropriate.

Checklist before requesting review

If any of these are left unchecked, please provide an explanation

  • I have updated or added tests to cover my code
  • I have updated or added documentation

* sanitized column name on single line.
*/
public static function sanitizeDescription(string $column) {
$column = preg_replace('~[^\x20-\x7E\t\r\n]~', '_', $column);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stefan-korn seems like it would be better to just remove the BOM rather than replace it with an underscore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve sanitizing column headers and description for datastore import

2 participants