WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#30461 closed defect (bug) (worksforme)

WP 4.0.1 stock contact form bug: parsing problems?

Reported by: grayson.king Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.0.1
Component: Formatting Keywords:
Focuses: Cc:

Description

The stock contact form (not a plugin) is misbehaving in 4.0.1 where it behaved fine in earlier versions. Specifically, it seems to have trouble with parsing of the shortcode. The contact form builder generates shortcode with single quotes (') surrounding each label. But at some stage these seem to get translated into right single quotes (’), which appears to screw up WP's parser.

For example if I wanted a field named "How did you first hear about us?", the shortcode would look something like this:

[contact-form subject='Test1'][contact-field label='How did you first hear about us?' type='text'/][/contact-form]

All looks good. But somehow the single quotes (HTML ') get translated to right single quotes (HTML ’) somewhere along the way. Which causes major problems for the parser.

The displayed heading for the field in the example above should be:
How did you first hear about us?

But instead it shows:
’How

This is a problem for anyone using the stock contact form in WordPress! Can someone please fix it?

For an example of a page that's not displaying properly (at least for now, until I find a work-around to this bug), please check out the following:

http://poleclinometer.com/contact/

The final field in this form should read:
How did you hear about PoleClinometer?

Change History (4)

#1 @SergeyBiryukov
5 years ago

  • Component changed from General to Formatting

There is no stock contact form in WordPress core. The linked page appears to be using an outdated version of the Jetpack plugin (3.1.1). The current version is 3.2.1.

#2 @miqrogroove
5 years ago

  • Resolution set to worksforme
  • Status changed from new to closed

This was a known bug in obsolete versions of the Jetpack plugin, which failed to register the contact-field shortcode. That ticket was https://github.com/Automattic/jetpack/pull/1130

#3 @ocean90
5 years ago

  • Milestone Awaiting Review deleted

#4 @grayson.king
5 years ago

My bad. Didn't realize the contact form feature I was using was part of JetPack; thought it was a stock feature of WP. I updated JetPack and problem is now resolved. Thank you! And apologies for cluttering the bug list with a non-bug (or at least a resolved one unrelated to WP core).

Last edited 5 years ago by grayson.king (previous) (diff)
Note: See TracTickets for help on using tickets.