WordPress Visual Editor Changes My HTML Code

I have a love/hate relationship with WordPress’ Visual editor. The editor can be great sometimes. Other times it can be a pain. I already disable “WordPress should correct invalidly nested XHTML automatically” as their definition of nested XHTML doesn’t really cover everything XHTML supports.

So if you noticed, I’ve began to recently embed flash videos into my blog posts, something I’ve avoided doing for some time since it doesn’t really fit well with my theme, which I’m in the market of changing. Still searching for one that I’d like. I recently switched to the Green Light theme for my HD-Trailers.net Blog, but I’m not sure if I want to have that here at Krunk4Ever!

I love the fact that when you try to add an image, it’ll automatically fill in the height/width and allows me to set alignments and etc. However, for everything else, I usually use the HTML editor which allows me to put in code directly.

Anyway, today’s blog post is how frustrating the Visual Editor can be some times. The main problem started because I started embedding flash videos into my blog post. I like my webpages to be XHTML valid, and for those who have this gene, you’ll know that most flash code websites provide are XHTML invalid. I found out how to modify it. Basically the <embed>...</embed> is invalid and I have to add a few attributes to the <object> tag.

For example for this video on YouTube (Lime in the Coconut), the embed code they provide is:

<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/BUG8A8e8KC0&amp;hl=en&amp;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/BUG8A8e8KC0&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>

To make it XHTML compliant, you covert it to:

<object width="425" height="344" type="application/x-shockwave-flash" data="http://www.youtube.com/v/BUG8A8e8KC0&amp;hl=en&amp;fs=1"><param name="movie" value="http://www.youtube.com/v/BUG8A8e8KC0&amp;hl=en&amp;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/BUG8A8e8KC0&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>

Resulting in:

<object width="425" height="344" type="application/x-shockwave-flash" data="http://www.youtube.com/v/BUG8A8e8KC0&amp;hl=en&amp;fs=1"><param name="movie" value="http://www.youtube.com/v/BUG8A8e8KC0&amp;hl=en&amp;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param></object>

Just for kicks, here’s the video:

If you watch House, M.D., you’d recognize this song, which was hilarious!

However, if you switch to the Visual editor and back to the HTML editor, WordPress decides that your flash code should look like this:

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/BUG8A8e8KC0&hl=en&fs=1" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/BUG8A8e8KC0&hl=en&fs=1" allowscriptaccess="always" allowfullscreen="true"></embed></object>

It removed my type and data attributes, stuck in the classid and codebase attributes, and then re-added the embed block back in. WordPress strives to create XHTML compliant code (hence the check to correct any invalid nested XHTML), but why re-add the embed block which is XHTML non-compliant?!?!? I found it annoying and basically the flash video would have to be the last thing I add or else the code gets “corrupted”.

I tested the newest version of WordPress (2.6.5) and this issue still exists. I found the following threads where people have been complaining about this issue:

It appears the WordPress folks have no plans on fixing this issue as they’re suggesting to use one or the other completely and don’t switch between editors. I’m generally okay with that approach, but on my HD-Trailers.net site, I have multiple people editing posts and can’t really enforce one editor for everyone. I have a SQL script I run every few days to fix some stuff that “disappears” after a post gets edited.

Others have suggested using a different visual editor, but it doesn’t seem that any is that great…

I have a hunch that the embed code is needed for flash to work on IE6, but if you’re surfing the web and still using IE6, you don’t deserve to see the flash content on my site. ;p

Update: Another common thing I do is insert <div align="center">...</div>, so stuff are aligned in the center, but switching between between the Visual and HTML editor removes the divs. It’s actually quite annoying.

25 Ways to Tell You’re Grown Up

So I got this list from Digg:

25 Ways to Tell You’re Grown Up

  1. Your houseplants are alive, and you can’t smoke any of them.
    Yah… all my houseplants are fake and purchased by my mom.
  2. Having sex in a twin bed is out of the question.
  3. You keep more food than beer in the fridge.
    No beer here, just tons of drinks.
  4. 6:00 AM is when you get up, not when you go to bed.
    Hahahahaha
  5. You hear your favorite song in an elevator.
  6. You watch the Weather Channel.
  7. Your friends marry and divorce instead of “hook up” and “break up.”
  8. You go from 130 days of vacation time to 14.
    So true, yet so sad. I miss summer vacation.
  9. Jeans and a sweater no longer qualify as “dressed up.”
  10. You’re the one calling the police because those %&@# kids next door won’t turn down the stereo.
  11. Older relatives feel comfortable telling sex jokes around you.
  12. You don’t know what time Taco Bell closes anymore.
    Does knowing when Wendy’s closes count?
  13. Your car insurance goes down and your car payments go up.
  14. You feed your dog Science Diet instead of McDonald’s leftovers.
  15. Sleeping on the couch makes your back hurt.
  16. You take naps.
  17. Dinner and a movie is the whole date instead of the beginning of one.
  18. Eating a basket of chicken wings at 3 AM would severely upset, rather than settle, your stomach.
    I guess doing a basket of chicken nuggets 3am is still fine.
  19. You go to the drug store for ibuprofen and antacid, not condoms and pregnancy tests.
  20. A $4.00 bottle of wine is no longer “pretty good shit.”
    When is wine ever “good shit”?
  21. You actually eat breakfast food at breakfast time.
    Still skip breakfast and usually lunch. Waking up at noon has the problem.
  22. “I just can’t drink the way I used to” replaces “I’m never going to drink that much again.”
  23. 90% of the time you spend in front of a computer is for real work.
    “real” work. ;p
  24. You drink at home to save money before going to a bar.
  25. When you find out your friend is pregnant you congratulate them instead of asking “Oh shit, what the hell happened?”

Bonus:

26: You read the entire list looking desperately for one sign that doesn’t apply to you and can’t find one to save your sorry old ass. Then you forward it to a bunch of old friends ’cause you know they’ll enjoy it too. And now you know why I am forwarding this to you..

Pretty funny list. See my remarks above (in italics).

JetBlue Now Flies SEA to LGB

This is sweet! While searching for flights to fly home for my brother’s graduation, I found out that JetBlue now has a direct flight from Seattle to Long Beach (equidistant as LAX to my house, minus the horrible traffic). I typically fly Alaska Airlines since they’re usually the cheapest (~$300) non-stop flight from SEA to LAX and had consistent quality. I’ve always liked JetBlue with the personal LCD and the quality of service, but was sad when I found out that they didn’t have any flights from Seattle to LA. I even emailed them awhile back voicing my sadness.

Anyway, I just booked a flight back for 4 days in mid-June to attend my brother’s graduation and it came out to only $243! For comparison sake, the cheapest Alaska Airline to LAX was $303. However, Alaska Airlines does have more daily flights between Seattle and LA than JetBlue does.

I think JetBlue and I are going to become much better friends now. 🙂

Diploma

I finally got my college diploma! I’ve always thought I’d be back in Berkeley to pick it up myself, but every time I’ve been back, the timing wasn’t right. The office was either closed, or I didn’t have time, so on and so on. I’ve dreaded to have them mail it to me, because I can’t see how they can justify charging $12 for it.

Anyway, apparently they only hold your diploma for 5 years and given that it’s almost 3 years since I graduated (my brother inviting me to his graduation reminded me), I decided that $12 it is.

I went to the Office of the Registrar website, and apparently they don’t take credit cards. !@$#$*&&!%&!$*!@#*!&%! Apparently I am forced to write them a check, and you know how I hate checks. I decided if that’s what it’ll take to get my diploma, so be it. I wrote them a $12 check and mailed it off with my application. By god, I can’t believe I still remember my student ID number without giving a sweat.

So what did $12 net me which would’ve cost me $0.00 if I picked it up in person? Apparently the following:

  • 1 cardboard envelope with a “DIPLOMA – DO NOT BEND” note on it
  • 2 paper-sized cardboard pieces to keep the diploma from bending
  • 1 UPS label to ship 1lb to anywhere in the USA
  • Someone putting this altogether and dumping it in the outgoing mail bin

Yeah, I feel gypped too. You’d expect it to at least come with a frame or something. Haha. ;p Oh well. At least now I have proof that I graduated from UC Berkeley with a B.S. degree. If my mom was here, she’d probably frame it. Knowing me, it’ll end up in my pile of junk. Plus don’t forget, I know have Arnold Swarchenegger’s signature!

P.S. This may be my last post in awhile. Been watching a lot of Genshiken and now I’ve started watching House.

Kashmiri v. Regents Student Fee Lawsuit

So MsticAzn sends me this link a few weeks ago: Kashmiri lawsuit refund information

Kashmiri lawsuit refund information

Date: 2008-01-30
Contact: University of California Office of the President
Phone: (510) 987-9200
Email:

On Jan. 23, 2008, the California Supreme Court denied the University of California’s petition for review of the judgment in favor of plaintiffs in the Kashmiri v. Regents student fee lawsuit. The San Francisco Superior Court will now approve a formula for determining the amount of each class member’s refund and a process for distributing refunds. Refund distributions will be handled by an outside claims administrator, not the university. Class members are encouraged to send their current email and postal addresses to the class action administrator for this case at: lnelson@rustconsulting.com. Any other questions should be directed to the attorneys representing the plaintiff class at: info@browngold.com.

Not having much clue what exactly the lawsuit was, I awaited MsticAzn to get more information.

However yesterday, SkyLancer brings up this same topic and apparently it had to do with UC Regents raising fees after students were enrolled back in 2003. Talking it over with Ungsunghero, he found the lawsuit documentation and apparently only applies to the following group:

  1. Current and former University of California (“UC”) students who enrolled in a UC professional degree program prior to December 16, 2000, and whose professional degree fees were raised after that date.
  2. Students who attended any UC school on a semester system during the Spring 2003 semester, whose fees for that semester increased after they had already enrolled in classes and received bills for the semester.
  3. Students who attended Summer 2003 session at UC Berkeley or UCLA, whose fees for that summer session increased after they had already enrolled and received bills for the session.

So I sent an email to Rust Consulting to find out how to determine if I was eligible for the refund and promptly received a reply back this morning:

Dear Mr. Hon,

Our records indicate that you are included in the Kashmiri v. The Regents of the University of California class. A notification was emailed to all class members to update them on the status of the settlement and to request that contact information be provided to update our records for future mailings. This notification was emailed to you at ********@berkeley.edu as that was the most current information that was available to us. I have included the notification in this email for your information in case you did not receive the previous email.

There is nothing further you need to do other than to keep us notified of any changes to your contact information. The case has been decided in favor of the students; however the trial court must still approve an allocation of recovery. Therefore, we are not certain when you will receive a refund, although it is likely to occur by the end of 2008. The students have created a website, www.educationisaright.org, that should post updates as they become available.

Sincerely,

Linda Nelson
Class Action Administrator
lnelson@rustconsulting.com

My ********@berkeley.edu email account was pretty much deactivated the day I graduated. I wonder if there’s some place I can go and update that email.

Anyway, here was the original email that was sent out to people:

IMPORTANT NOTICE ABOUT STEPS TO TAKE TO ENSURE YOU RECEIVE INFORMATION ABOUT YOUR POTENTIAL SHARE OF THE UNIVERSITY OF CALIFORNIA FEE OVERCHARGE JUDGMENT

You have been identified by the University of California as a member of the plaintiff class in the class action lawsuit known as Kashmiri v. The Regents of the University of California, which challenged certain fee increases at the University. The $33.8 million judgment in favor of the plaintiffs has been affirmed on appeal and is now final.

You will receive additional information about the distribution of the funds recovered from the University. As we begin this process, we need current e-mail and postal addresses for all class members so that we can send you additional notices and, eventually, a check if you are entitled to one. If you have changed your name, please provide both names. Please provide any updated contact information as soon as you can and if possible by April 21, 2008, by (1) replying to this e-mail (if you are the addressee), (2) sending an e-mail to ucfees@rustconsulting.com, or (3) mailing the information to Kashmiri v. Regents Class Action, P.O. Box 1931, Faribault MN 55021-7186. The information you provide will not be used for any other purpose.

Also, please forward this email to any of your classmates who may be members of the plaintiff class and encourage them to update their contact information. The plaintiffs consist of three subclasses:

1. Current and former University of California (“UC”) students who enrolled in a UC professional degree program prior to December 16, 2002, and whose professional degree fees were raised after that date.

2. Students who attended any UC school on a semester system during the Spring 2003 semester, whose fees for that semester increased after they had already enrolled in classes and received bills for the semester.

3. Students who attended the Summer 2003 session at UC Berkeley or UCLA, whose fees for that summer session increased after they had already enrolled and received bills for the session.

Thank you.

Rust Consulting
Class Action Administrator

If you believe you qualify for the refund but did not receive an email from them, you should email Rust Consulting to verify if they have your updated information. I’m not sure how the refund is going to be split or how much each person will get, but I assume we’ll find out shortly.

Do I Ever Sleep?

So SueOn asked me this question earlier:

do you ever sleep?
or are you like chuck norris
you just wait

That reminded me of the Zuckerberg testimonies I was reading earlier. Apparently the court files for the case when Mark Zuckerberg (founder of Facebook) was sued for stealing the social networking idea from another student group were accidentally released to a journalist/reporter. According to Facebook Founder Finds He Wants Some Privacy:

Social networking Web sites can seem dedicated to the idea that nobody’s personal life is worth keeping private, but when it comes to Mark Zuckerberg — the founder of Facebook, one of the largest networks — Facebook disagrees.

Facebook tried last week to force the magazine 02138 to remove some unflattering documents about Mr. Zuckerberg from its Web site. But a federal judge turned down the company’s request for a court order to take down the material, according to the magazine’s lawyers.

The dispute stemmed from a lawsuit charging that in 2003 and 2004, as a student at Harvard, Mr. Zuckerberg stole the idea and some of the computer source code for Facebook from some fellow students. They were planning a networking site of their own and had hired Mr. Zuckerberg to help with the programming.

You can read the original article on 02138: Poking Facebook:

Harvard dropout Mark Zuckerberg created one of the most trafficked sites on the Web and became a paper billionaire as a result. But ongoing lawsuits suggest that Facebook’s origins are murkier than Zuckerberg would like to admit. Is the man many are calling Harvard’s next Bill Gates telling the truth?

and here are the court documents from the Facebook trial: The Facebook Files.

How does this relate to the the question SueOn had asked me? In one of his testimonies, the transcript goes as below (Q = question/attorney and A = answer/Zuckerberg):

Q: Okay. What time did you wake up in the morning?
A: It probably wasn’t the morning.
Q: Okay. How late did you stay up programming?
A: I don’t know, like it’s quiet at night.
Q: Okay.
A: You can get work done.
Q: Did you work all night sometimes?
A: Yeah. I mean although, I guess that’s relative when you’re shifted hours like that.

You can say I’m pulling all nighters every day, but that’s because I go to sleep in the early morning (4-6am).

The testimony got boring really fast, though I will say that he sounded quite scared and his replies reminded me of someone who wasn’t really a profession, but brand new to the field.

I Thought Europe Was A Country

I saw this video a few days ago from Digg: Is Europe a country?

Funny video about a quiz show, where the question is about an obscure country called Hungary.

It’s a clip from the show, Are You Smarter than a 5th Grader? and to be honest, I think this was staged, but if it isn’t, it’s yet another example of how the American education system has failed.

SueOn had asked me if the contestant was someone famous and at that time, I didn’t know. Looking at the comments on YouTube, it appears the contestant is Kellie Pickler, apparently someone in American Idol. Then again, I’ve never watched American Idol, so I probably would’ve never figured it out.

Here’s the transcript (I’ve bolded the funny parts):

Jeff: You ready? The 3rd grade world geography question is: “Budapest is the capital of what European Country?” Budapest is the capital of what European Country? Nathan has already locked in.

Kellie: This might be a stupid question.

Jeff: I’m guessing it’s probably going to be.

Kellie: Okay. Like… I thought Europe was a country. Let’s see. Budest… Budapest! I’ve never even heard of that.

Jeff: Alright, here… here’s your options. I mean you could drop out with $10,000. But…

Kellie: Like I know they speak French there, don’t they? Like I wanna say is France a country. I don’t know what I’m doing.

Jeff: You know what, let’s talk about your options.

Kellie: Can I just like… Okay.

Jeff: Kell, focus.

Kellie: I am… Like I’m listening to what you’re saying, but I only hear what I want to.

Jeff: That’s just called being a woman.

Kellie: Oh… Boooooooo! Well, we could just call this show “Are You Smarter Than A Man?” I’d win that one.

Jeff: Women don’t really want to hear a man’s opinion. They just want to hear their opinion in a deeper voice. That’s what they want when they talk to us. Let’s talk about this. I really want you to get the $25,000 because no matter what happens after that, you’re walking out of here with $25,000.

Kellie: Yes. It’s all about the charity, so I got to think what’s best for them. Let’s see. I am just going to … copy.

Jeff: Copy.

Kellie: Come on Nathan.

Jeff: If you had to guess… if you had to guess… do you have a guess?

Kellie: I don’t think France is a country, but would’ve said that. I dunno… I don’t know. I’m just going to say France. I dunno.

Jeff: France is a country, I will tell you that.

Kellie: It is?

Jeff: If you had said France, you would’ve gone home with nothing.

Kellie: Whew…

Jeff: That’s not the right answer. The right answer is Hungary.

Kellie: Is what?

Jeff: Hungary.

Kellie: Hungry?

Jeff: Like I’m hungry.

Kellie: That’s a country? I’ve heard of Turkey, but… Hungary, never heard of it.

Jeff: But the answer is Hungary. So if Nathan said Hungary, your charity’s got $25,000. If he didn’t, you walk away with nothing.

Kellie: You’re not smiling, Nathan. You’re not smiling. Awwwwww.

Jeff: Kellie, look at the board. For $25,000, your 5th grade classmate Nathan said… Hungary!

Kellie: Ahhhhhhhhhhhhhh! Great! You’re the best! Thank you! Yeah! You tried to trick me. He tricked me.

Jeff: He tricked you?

Kellie: I was looking at his face and he looked like uh ummmmmm messed it up. I failed. But you got it right, yay.