• Welcome to the Speedsolving.com, home of the web's largest puzzle community!
    You are currently viewing our forum as a guest which gives you limited access to join discussions and access our other features.

    Registration is fast, simple and absolutely free so please, join our community of 40,000+ people from around the world today!

    If you are already a member, simply login to hide this message and begin participating in the community!

&#39 everywhere

Carson

Premium Member
Joined
Feb 1, 2008
Messages
1,285
Location
Somerset, Kentucky, United States
WCA
2008PENT01
I have been attempting to learn 4x4BLD, and have been reading through many old threads in the process. Many of these threads have this code, which I assume happened somewhere along the way when an update was made to the forum. I'm sure that manually fixing all of this would be time preventative, but was wondering if there was perhaps some batch type fix.

Corners:
D2 y'RU'R'U'RUR'F'RUR'U&# 39;R'FRy D2
L'ULUL'U'LFL'U'LULF'L&#3 9;
LU'R'UL'U2RU'R'U2R (new cycle)
D L'ULUL'U'LFL'U'LULF'L&#3 9; D'
LULUL'U'LFL'U'LULF'L
ULUL'U'LFL'U'LULF'L2
F2 L'ULUL'U'LFL'U'LULF'L&#3 9; F2
 

aaronb

Member
Joined
Apr 23, 2011
Messages
424
Location
Maine, USA
The same thing actually happened to me. Tried to learn 4x4 BLD (Eventually got lazy and quit) and that code was everywhere in old threads. Though I find it obvious that "&#39" equals an apostrophe. So the first line in your quote would become "D2 y'; RU'; R'; U'; RUR';F'; RUR'; R'; R'; FRy D2" I thought the problem was well known and that it was just a hassle to fix all those threads, so I never mentioned it.

Thanks for making this thread though.
 

Brest

Moderator
Staff member
Joined
Sep 30, 2010
Messages
2,440
YouTube
Visit Channel
It actually includes the semicolon <'> and is HTML decimal for a standard apostrophe. I have manually edited a few of the old (useful) posts that I have come across with this formatting error; however some kind of 'batch fix' would be much less painstaking.
Carson, which thread did you take that text from?

Edit:
Also: <!> ! <"> ?
 
Last edited:

pjk

Administrator
Staff member
Joined
Mar 13, 2006
Messages
6,686
WCA
2007KELL02
SS Competition Results
Any thread with these characters is way back from like 2007 when we moved from phpBB to vB. The character issue was tough to avoid, since I had to buy the database from the free host so that I could preserve all the old posts (and then there were some character incompatibilities). At the time, we had 30,000 posts on the forum, and I'd say only a few were affected to the extent where they needed to be heavily edited (and a lot were heavily edited over the years). It would be much easier to just fix these as we come across them. The best way would be to copy into notepad, do a find and replace, and then paste from notepad into the thread. If you come across some, post links here so the mods can make their way through them.
 

Brest

Moderator
Staff member
Joined
Sep 30, 2010
Messages
2,440
YouTube
Visit Channel
Can't you just copy text into notepad, do Ctrl+H then replace the thing?
The best way would be to copy into notepad, do a find and replace, and then paste from notepad into the thread.
This is what I have been doing.

How about something like
UPDATE posts SET text = REPLACE(text, "'", "'")
If this is what I think it is, I would like it to happen.
 

Carson

Premium Member
Joined
Feb 1, 2008
Messages
1,285
Location
Somerset, Kentucky, United States
WCA
2008PENT01
Carson, which thread did you take that text from?

A post in dbeyer's thread: How To: Commutators for Big Cubes


When needed, I have been using the copy/paste + find and replace trick. It's not a huge deal most of the time, but it becomes slightly more annoying when digging through many old posts at once.

Edit: According to Google, there are 410 threads containing "&#39" in the forums, although one of those is this one. I'm sure greater than 300 of those threads or pointless though...
 

radmin

Member
Joined
Feb 25, 2010
Messages
401
Location
Columbus, Ohio
WCA
2010HARD02
How about something like
UPDATE posts SET text = REPLACE(text, "'", "'")

mySQL uses single quotes for strings so "'" would error out. But a correct version should be possible. I use MSSql so I'm not sure what the right way is on MySQL.

It seems like there should be a way to tell the page to render those correctly, like by setting the character encoding in a meta tag or something.

The original forum probably replaced ' with &#39 to prevent script injection.
 
Last edited:

Litz

Member
Joined
Dec 14, 2009
Messages
216
Location
Portugal
mySQL uses single quotes for strings so "'" would error out.
That's not the point but I'm pretty sure it wouldn't error out. That script (with the appropriate table/column names obviously) should solve the problem in just a few minutes (if you use something like MySQL workbench you might have to disable safe updates but that's it).
 

FatBoyXPC

Member
Joined
Nov 28, 2009
Messages
1,796
WCA
2010LACH01
YouTube
Visit Channel
Don't forget to put the site down for maintenance or something if the posts table is MyISAM. Writing to the MyISAM table locks the whole table I believe, whereas InnoDB will only lock the respective row.

In any case, if this is also a problem with other characters, you could also just find php scripts that format the text for display, and throw an html_entity_decode() around the output text. That should fix it for all the characters, whereas doing this update will only do this specific character.
 

pjk

Administrator
Staff member
Joined
Mar 13, 2006
Messages
6,686
WCA
2007KELL02
SS Competition Results
Don't forget to put the site down for maintenance or something if the posts table is MyISAM. Writing to the MyISAM table locks the whole table I believe, whereas InnoDB will only lock the respective row.

In any case, if this is also a problem with other characters, you could also just find php scripts that format the text for display, and throw an html_entity_decode() around the output text. That should fix it for all the characters, whereas doing this update will only do this specific character.
Of course it will go down for a bit. The database is pretty massive. As for other characters, I will deal with those separately as problems arise. This character is the biggest problem because it is part of so many algs. Cheers for the suggestions.
 

insane569

Member
Joined
Mar 6, 2011
Messages
432
Location
Don't Worry About It
WCA
2011LUEV01
YouTube
Visit Channel
Am I the only one seeing this on YT?
54f2u0.jpg

It shows up on some vids.
 
Top