Opened 9 years ago

Closed 4 years ago

Last modified 4 years ago

#59 closed defect (bug) (fixed)

WP 1.2 (and 1.2.1 CVS) eating backslashes

Reported by: Zarniwoop Owned by: ryan
Priority: normal Milestone:
Component: General Version: 1.2
Severity: major Keywords:
Cc: Zarniwoop

Description

Everytime when writing or editing a post WP omits one backslash i.e "
" becomes "\" and "\" disappears. The same problem appears when editing comments and the summary. The post title is not affected by this.

Change History (12)

comment:2   ryan9 years ago

  • Owner changed from anonymous to rboren
  • Status changed from new to assigned

Workaround: If you're just looking to display the backslash character, use \ instead.

edited on: 06-18-04 07:53

I needed real backslahes since the Markdown plugin makes use of them when writing posts. I already did some hacking on the code to make it work for me, but IMHO -- since it seems to be fixed in CVS HEAD -- the main problem is to correct the inconsistent database when upgrading to 1.2.1 within the upgrade.php. I did this manually by hand-editing the title of all my posts.

Another problem arises with posts from pre1.2 (this is bug http://mosquito.wordpress.org/bug_view_page.php?bug_id=0000018) because the post content was escaped with addslashes (in 1.0.1) but it did not show up (there was a stripslashes for the post content in function start_wp() which is removed now as a part of the bug-fix). For me it worked to export the table as SQL (using phpmyadmin) and do some search and replace before reinserting it into the database but there has to be a more comfortable solution which works for people without knowledge of SQL and larger amounts of posts (I only had about 30 posts imported from 1.0.1 where search and replace is still possible but I won't do it for 100+ posts).

would be nice to have a real "codefilter" option anyway (similar as backticks in the support forum)

comment:6   ryan9 years ago

  • Resolution changed from 10 to 20
  • Status changed from assigned to closed

Unnecessary calls to addslashes() and stripslashes() removed. Extra slashes present in the db are removed during upgrade.

comment:7   matt9 years ago

  • Component changed from General to Quick Edit
  • Resolution fixed deleted
  • Status changed from closed to reopened
  • Summary changed from WP 1.2 (and 1.2.1 CVS) eating backslashes to WP 1.2 (and 1.2.1 CVS) eating backslashes -- Present in 2.7.1 Quick Edit
  • Version changed from 1.2 to 2.7.1

This bug is present in 2.7.1, but the slashes are only removed when the post it saved with Quick Edit function. This is a real pain as posts with LaTeX math will get mangeled by this.

Seems that my description dissapeard. When saving a post with Quick Edit, backslashes get striped from the post.. a pain if threre are TeX math commands in the post

  • Component changed from Quick Edit to General
  • Resolution set to fixed
  • Status changed from reopened to closed
  • Version changed from 2.7.1 to 1.2

Please don't reopen ancient bugs that predate Quick Edit by years. :-)

I believe the bug you describe is already fixed in 2.8. Can you try 2.8-beta2 and open a new ticket if the big still exists.

  • Summary changed from WP 1.2 (and 1.2.1 CVS) eating backslashes -- Present in 2.7.1 Quick Edit to WP 1.2 (and 1.2.1 CVS) eating backslashes
Note: See TracTickets for help on using tickets.