HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

div instead of span

vrijvlindervrijvlinder Papillon-Sauvage MVP
edited January 2014 in Feedback

Hi p , I discovered a small problem with the use of span to contain the pullquote, basically if you have any thing using span in the message, it is ignored and stays outside of the box, while the box is tiny but empty. I tested using div and it worked perfectly for me.

$replace = Array('$2 <div class="pullquote"> $2 </div>');

Tagged:

Comments

  • Options
    peregrineperegrine MVP
    edited January 2014

    V, go into edit mode in the message and just cut and paste the message that created the problem and zip it and attach it here. I'll look at it the zip of your attached cut and paste message that caused problem. I don't need a screenshot.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options

    You could change it to div if you want. it will rescue you if you put pullquotes around incomplete opening and closing span tags, but then it will break if you put it around incomplete opening and div tags.

    the goal is to make sure your pull quote does not have a partial span tag (opening or closing) or a partial div tag (opening or closing).

    the other alternative is to strip all tags, or to remove partial tags from the pullquote via a preg_replace_callback.

    or you can adjust what you need to, that works for you.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    Yes, I realize that when you add the short code on the rich text side of cleditor, you can't see where the tag starts or ends.. Inadvertently placing it inside something else.

    The cleditor adds a span tag without class or id when you use the buttons to edit text.
    Makes it easier to add it this way than writing all the html. Or copying rich text.

    I don't use div much when I post something , mostly p and span so I will stick to div :)

    Thanks p

  • Options

    I reworked version 1.2. should clear up problem cleanly instead of resorting to modifying to div to overcome problem.

    also limits pullquotes to max 200 chars, but you can change it to whatever max you want.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    Yea good idea, if they are any bigger they become more than quotes ...will give 1.2 a try thanks :)

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    Well it seems to work also, except some strange behavior when using the tinymce. It strips the rest of the html outside of the pull quote, however it functions normally using cleditor and button bar . Tested in both 2.0 and 2.1

  • Options

    @vrijvlinder said:
    Well it seems to work also, except some strange behavior when using the tinymce. It strips the rest of the html outside of the pull quote, however it functions normally using cleditor and button bar . Tested in both 2.0 and 2.1

    thx for testing. I don't use tinymce :)

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    I think I know why it is happening , I switched editor to edit the same post and the html got changed from span to div very odd, I switched editors and it went back to span and all was ok.... I think that is the main reason. But it does not matter it works anyway, just have to use it on a new post that has no html yet.

    Maybe the tinymce does not ignore the shorcode as the cleditor does...It's all good anyway... Thanks p :)

Sign In or Register to comment.