Skip to content
This repository has been archived by the owner on May 19, 2020. It is now read-only.

Site names cannot contain ' #5

Closed
SpenserJ opened this issue May 5, 2011 · 10 comments
Closed

Site names cannot contain ' #5

SpenserJ opened this issue May 5, 2011 · 10 comments

Comments

@SpenserJ
Copy link
Contributor

SpenserJ commented May 5, 2011

When you set the site name to something containing ' (single quote), it doesn't escape it and breaks the config file.

@ghost
Copy link

ghost commented May 5, 2011

Is this in the installer?

@ghost ghost closed this as completed May 5, 2011
@ghost ghost reopened this May 5, 2011
@Makeshift
Copy link
Contributor

Shouldn't matter, in theory. If a user follows the installer, then surely the installer can be coded to put in an escape? This only has an affect if the user edits settings manually and forgets to add an escape. Nonetheless, I'll give it a shot since you asked me to.

@ghost
Copy link

ghost commented May 5, 2011

I guess we could use "double quotes".

@Makeshift
Copy link
Contributor

Only way to do it that I can see is to use double quotes, unless it were coded to look for how it's written, and replace accordingly with a str_replace?
(Example:
if(stristr($sitename,'') === TRUE)
{
str_replace(', ', $sitename);
}
)

@ghost
Copy link

ghost commented May 5, 2011

or str_replace(''', '’', $sitename);

It should be noted that I'm a type-nut.

@Makeshift
Copy link
Contributor

Consider it noted. And my C+P failed hard, so it missed out part of the code.

@SpenserJ
Copy link
Contributor Author

SpenserJ commented May 5, 2011

Oh my gosh. You guys kind of really suck at this :P VI did get the best solution though, as just replacing ' with ' would cause issues if I set my title to ' (you'd get '). Replacing ' with ’ will completely remove it, and use an HTML entity instead, which is safe.

As for where to implement this, you need it in both the installer, and when you save the settings. And when you load the settings, you have to make sure it renders properly as '

@ghost
Copy link

ghost commented May 5, 2011

But there's no installer... Yet.

ghost pushed a commit that referenced this issue May 5, 2011
Signed-off-by: VI <iam@visualidiot.com>
@ghost
Copy link

ghost commented May 5, 2011

Did I fix this?

@SpenserJ
Copy link
Contributor Author

SpenserJ commented May 5, 2011

Yes. You should have said Fix #5 in your commit message, as it would automatically close this issue.

@SpenserJ SpenserJ closed this as completed May 5, 2011
@ghost ghost mentioned this issue Feb 9, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants