Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 10:09 am EST

Geeklog Forums

Rehashing Stories


Austin

Anonymous
I have a lot of stories posted in plaintext mode but include html formatting. I ran a query to change their format in html in the tables...but the html tags still aren't being parsed correctly. When I go to edit a story, it shows that html is the format...and, if I then click "save," it posts it correctly...but I'm looking for a solution that can auto-correct all of the stories. Is there a way to do this?

Thanks!
 Quote

Austin

Anonymous
In case anyone is interested, I found a solution to this. On insert/update, the story is formatted for html or plaintext...so, to convert between the two using SQL, you have to run a search and replace. An example query:

UPDATE gl_stories SET introtext = replace(introtext,"&lt;br&gt;","<br>"Wink where sid > '20080719161001241'
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
HTML mode is actually escaping a few more things, but I guess it would work for most simple stories.

How did you manage to post a lot of stories in the wrong mode?

bye, Dirk
 Quote

All times are EST. The time is now 10:09 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content