Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Naji Amer

    (@n-for-all)

    The field is already in utf-8 and contact form 7 saves the values not the repeater, anyway maybe i am missing something, can you provide an example?

    Thanks

    Thread Starter Roi Webreach

    (@roi-webreach)

    hey
    when i try to use Hebrew in the shortcode it breaks
    this is what i’ve tried:
    [repeater add-label:???? remove-label:??? index:0 min:0 show:1]
    and i get in the frontend the defaults (add / remove)

    Hello,

    I had the same issue with a french accent :
    [repeater add-label:Ajouter_à_assurer remove-label:- index:0 min:0]

    Finally, I found the problem, but it’s not a “Cf7 Fields Repeater” bug. It’s a CF7 bug : CF7 doesn’t allow UTF8 chars in the shortcodes except for options like in the select shortcode (and between ” or ‘)

    This line is faulty :
    $pattern = '%^([-+*=0-9a-zA-Z:.!?#$&@_/|\%\r\n\t ]*?)((?:[\r\n\t ]*"[^"]*"|[\r\n\t ]*\'[^\']*\')*)$%';

    (includes/shortcodes.php into shortcode_parse_atts)

    It should be :
    $pattern = '%^([-+*=\pL\pN\pM:.!?#$&@_/|\%\r\n\t ]*?)((?:[\r\n\t ]*"[^"]*"|[\r\n\t ]*\'[^\']*\')*)$%u';

    (replace 0-9a-zA-Z by \pL\pN\pM and put a ‘u’ at the end to enable utf8)

    Naji : are you in touch with CF7 staff or should I try to contact them ?

    Thanks

    Plugin Author Naji Amer

    (@n-for-all)

    Hello,

    Yes it looks like a bug in CF7 plugin, however i created a workaround to this issue, please update to version 2.0.2 and follow the steps below:

    • Open the repeater shortcode and under the labels check base64 decode
    • Open this link and paste the text in the first textarea then click encode
    • You will get a new text (encoded), get the text and use it in the fields repeater label
    • Generate the shortcode then save

    It is basically encoding the text to base64 and decoding it back in the frontend to not break the shortcode.

    Please follow up with contact cf7 from your side on this issue and use this workaround in the meantime until this issue is resolved.

    Cheers

    The base64decode idea is great !
    It allows to put things like that into the add-label :
    <span class="dashicons dashicons-trash"></span>Remove

    (of course, you need “Frontend Dashicons” plugin to add the dashicons font to the frontend, but you see the idea)

    Thanks for the 2.0.2 version !

    Thread Starter Roi Webreach

    (@roi-webreach)

    hey, it supposed to work in the free version as well?
    if so, i didnt understand what to do
    i tried to do [repeater add-label:15TXldeh16Mg16nXldeo15Q= remove-label:157Xl9enINep15XXqNeU index:0 min:0 show:1]
    and it didnt work
    did i missed something?

    You have to add base64decode in the shortcode :
    [repeater add-label:15TXldeh16Mg16nXldeo15Q= remove-label:157Xl9enINep15XXqNeU index:0 min:0 show:1 base64decode]

    Thread Starter Roi Webreach

    (@roi-webreach)

    amazing! thanks ??

    Plugin Author Naji Amer

    (@n-for-all)

    your welcome ??

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘add utf-8 support’ is closed to new replies.