Review Request 115547: Bug fix : Allows further support of special character in project name

Michael Ferris mike.ferrisb at gmail.com
Sun Feb 9 00:52:07 UTC 2014



> On Feb. 8, 2014, 12:16 a.m., Sven Brauch wrote:
> > Besides the fact that your implementation is ... curious and very hard to understand, I do not think this is the correct way to solve the problem, honestly. The whole idea of percent-encoding application the project name is imo flawed. Percent signs have their own share of problems in the various places where the project name is used.
> > 
> > Instead, I think we should just have a list of allowed characters (I'd in fact go with just 0-9, a-Z and _ and disallow starting with a number, then you can use it everywhere without fear of ending up with anything broken) and check against that on the UI side, aka disallow even creating projects with names not matching that by not allowing to confirm the dialog with an invalid project name.
> > 
> > If people really want projects with names which contain plus signs, they can rename the stuff in the template themselves in my opinion.

I most certainly see how this code is harder to understand, I was too focus on making performant code than readable. I can very easily change that.
However, before I make any changes, I would like to know what we actually expect from this.
I understand your feeling about the percent encoding and I thought it was curious myself.
What I could do, as you suggested, is simply enforce the use of letters digits and underscores which I think would be best.

Also, from what I can see the actual location of the project and its name are currently linked together.
What could be done is to accept all characters for the project name, but having restrictions for the location.


- Michael


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115547/#review49232
-----------------------------------------------------------


On Feb. 8, 2014, 12:04 a.m., Michael Ferris wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/115547/
> -----------------------------------------------------------
> 
> (Updated Feb. 8, 2014, 12:04 a.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Bugs: 282783
>     http://bugs.kde.org/show_bug.cgi?id=282783
> 
> 
> Repository: kdevplatform
> 
> 
> Description
> -------
> 
> Allows the location of the project to have more character then only digits, letters, spaces and %. Still checks for unsupported character and insert the percent encoded value.
> 
> 
> Diffs
> -----
> 
>   plugins/appwizard/projectselectionpage.cpp 6270869 
> 
> Diff: https://git.reviewboard.kde.org/r/115547/diff/
> 
> 
> Testing
> -------
> 
> Create a new project with test:<>*?/\\|!@#$%?&%2A()_+ and the location was test%3A%3C%3E%2A%3F%2F%5C%5C%7C!@#$%^&%2A()_+
> Here we can see all unsupported character have been percent encoded and the rest stayed the same.
> 
> 
> Thanks,
> 
> Michael Ferris
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20140209/ea6ba46c/attachment.html>


More information about the KDevelop-devel mailing list