• I’m using html entities in the quiz definition, e.g. & minus; or & times; etc … CF7 displays them ok the first time the page is accessed, but when submitting the form, regardless whether it is successful or not, the quiz label is escaped to & amp;minus; and & amp;times; etc.

    (I used spaces above because the WP forums are parsing them …)

    As a side note, the & nbsp; that CF7 adds after the label is causing some difficulties when skinning the form to match a custom website design. I suggest removing the & nbsp; and using styles, in particular you can add span.wpcf7-quiz-label { padding-left: 1ex; display-inline-block; } in the stylesheet for the same effect, but which can be easily overriden by the website’s stylesheet.

    http://wordpress.org/extend/plugins/contact-form-7/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter normadize

    (@normadize)

    The fix is to change .text(n[0]) to .html(n[0]) in scripts.js line 220 in here:

    $.fn.wpcf7RefillQuiz = function(quiz) {
    	return this.each(function() {
    		var form = $(this);
    
    		$.each(quiz, function(i, n) {
    			form.find(':input[name="' + i + '"]').clearFields();
    			form.find(':input[name="' + i + '"]').siblings('span.wpcf7-quiz-label').html(n[0]);
    			form.find('input:hidden[name="_wpcf7_quiz_answer_' + i + '"]').attr('value', n[1]);
    		});
    	});
    };
    Thread Starter normadize

    (@normadize)

    This bug is still present in the new v3.4

    Thread Starter normadize

    (@normadize)

    Still present in v3.4.1 …

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Issues with html entities in quiz definition nbsp issue’ is closed to new replies.