Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Harmonic Design

    (@harmonic_design)

    Hmm… I can’t think of why a + symbol would be stripped out. I’ll look into it and get back to you.

    Thread Starter Michel

    (@michel92)

    Thanks for your answer, Dylan.

    This morning, I deactivated one by one all the other plugins to see if there was an interference between HD Quiz and them. But the bug was still here.
    So, I tried to put “” around the text (“2 + 1”), but nothing changed.
    I also tried to use the “old” version of function.php (you developed a special version here: https://www.ads-software.com/support/topic/show-results-above-or-below-quiz/) but nothing changed.
    I also tested with + – / % $ = – ( ) & # @, all the signs appeared in the comment, except the +.
    The quiz is here: https://ooxo.com/quiz/quiz/calcul-quiz-mental-operations/quiz-addition-puissances-de-2-4-8-16-32-64-128-256-binaire-bits/
    Click directly on “VOIR LES REPONSES” to get 0/10, because the text with “+” is for people who failed the quiz.
    In the other quizzes, I did not use the “+” sign.
    I also looked inside the source code of the web page, but the “+” was not here ??

    Finally, I continued my investigations.

    I looked inside wp_termmeta. The + sign was not inside (but I saw it in the admin section of HD Quiz).

    I modified that (the + were not here when I opened it):

    {s:4:”name”;s:14:”quiz_fail_text”;s:4:”type”;s:6:”editor”;s:8:”required”;s:0:””;s:5:”value”;s:76:”Ben oui, 2 + 1 c’est facile, mais 128 + 32 + 8 + 4 + 1, c’est moins dr?le…”;s:3:”tab”;s:7:”results”;}

    But I know that kind of file… “s:76:” is the number of characters in the following text.
    So, when I did not modify “s”, I saw all the questions of the quiz (despite their limitation to 10). So, I replaced 76 by 81. This time, 10 questions were displayed but the + sign did not appear ! It did not disappeared from the wp_termmeta when I recorded it (I see it again in the file), but I can’t see it on the web page.
    NEW : This time, after modifying wp_termmeta, I see the “+” inside wp_termmeta but I can’t see it in the admin section of HD Quiz ! And when I add it again in the admin section, it disappears from wp_termmeta and from the result page of the quiz ! It’s a David Copperfield trick ! Where is the + ?

    • This reply was modified 4 years, 3 months ago by Michel.
    • This reply was modified 4 years, 3 months ago by Michel.
    • This reply was modified 4 years, 3 months ago by Michel.
    • This reply was modified 4 years, 3 months ago by Michel.
    • This reply was modified 4 years, 3 months ago by Michel.
    Thread Starter Michel

    (@michel92)

    Hello again ??

    It’s a new post because I found a “solution” reading your recent answer to fariazz.
    And ou guess what I did… I used the HTML code for + : & # 043; (with spaces here, to display the difference)
    But it’s a palliative, not an elegant solution.

    • This reply was modified 4 years, 3 months ago by Michel.
    • This reply was modified 4 years, 3 months ago by Michel.
    Plugin Author Harmonic Design

    (@harmonic_design)

    Glad you saw that. The thing is that having to use HTML character codes is something that is SUPER rare. I only recommended it to the previous user because they literally wanted to use HTML code but not have the HTML code render.

    I believe this issue has to do with the sanitization method being used (this means cleaning the text to make sure it is both valid and secure).

    The method I am using is the exact same function that all WordPress content gets filtered through and I cannot for the life in me think of why it would strip out a + symbol :s

    Are you using the latest WP v5.5?

    I haven’t had time to experiment yet, but I’ll be doing some testing to see if there is A) a reason WordPress does not allow a + symbol, and B) if there is a safe way to allow it in HD Quiz as I think it should absolutly be allowed.

    Thread Starter Michel

    (@michel92)

    Thanks for your answer.
    Yes, the version of WordPress is 5.5 (in French).

    Plugin Author Harmonic Design

    (@harmonic_design)

    Thanks – one of my theories as that 5.5 might have changed the sanitation function so that’s something I’ll look into

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Bug in “Quiz Pass” and “Quiz Fail” text’ is closed to new replies.