• Resolved jazzylee77

    (@jazzylee77)


    When pasting something like this in the html field of post

    <form> <input style="border-color: rgb(85, 85, 85);" name="showImage1" class="showImageTextBox" onfocus="this.form.showImage1.select()" onclick="this.form.showImage1.select()" value="<a href=&quot;https://www.mysite.com/the-subject&quot;><img src=&quot;https://map.mysite.com/stash/image.gif&quot; border=&quot; 0 &quot; alt=&quot;The Subject&quot;></a><br /> onmouseover="this.style.borderColor='#FFC533'" onmouseout="this.style.borderColor='#555555'" size="20" type="text"></p>
    </form>

    instead it is pasted as

    <form><input class="showImageTextBox" style="border-color: #555555;" onclick="this.form.showImage1.select()" onmouseover="this.style.borderColor='#FFC533'" onmouseout="this.style.borderColor='#555555'" alt="&quot;New" name="showImage1" size="20" src="&quot;https://map.mysite.com/stash/image.gif&quot;" type="text" value="<a href=" />
    
    </form>

    basically truncating the guts of the form. I’m wondering if I should try messing with varchar setting in tables and which table?

Viewing 12 replies - 16 through 27 (of 27 total)
  • Let us know how it goes with IE. Since you’re using Firefox; I suddenly suspect that there may be a Firefox Add-on that’s doing this to you. I’ve seen some very strange behavior occur with the WordPress HTML and Visual editors when using various add-ons in Firefox.

    Thread Starter jazzylee77

    (@jazzylee77)

    A bit different behavior in IE. Sorta works in preview, (some unintended text is copied by the user — onmouseover=…) but strips the url and beyond out of the value when switching to visual editor.

    don’t switch to the visual editor!

    Switching to the visual editor will definitely change the code; as the visual editor is configured to strip non-sanitized code automatically. That is one of the downsides of TinyMCE (or most WYSIWYG editors for that matter).

    However, if the paste function is basically working in the HTML editor in Internet Explorer; I would strongly suspect the issue is tied to a specific Firefox Add-on rather than being related to WordPress itself.

    Thread Starter jazzylee77

    (@jazzylee77)

    With all plugins deactivated it does not truncate immediately on pasting. But does when switching to visual editor.

    I’m close to giving up. Not a critical thing, but it would be nice, since a lot of the sites images are the type people like to share and can bring a link back with the right copy/paste form.

    I’ve looked at a lot of gallery plugins in vain looking for this feature

    Thread Starter jazzylee77

    (@jazzylee77)

    Not sure I can handle the trade off of not using the visual editor. That would really slow me down, and I have hundreds of posts to make that use this.

    Again, the visual editor will always strip out that type of code (unless you heavily modify the allowed elements in the WordPress implementation of TinyMCE), so switching to the visual editor will mess up that code no matter how many plugins you disable.

    If things are working in the HTML editor now, though, that’s the best it’s going to get. You’ll just have to keep in mind that you can’t use the visual editor for pages that include that code.

    or better yet – create a shortcode and use that in the content, then you can use the Visual editor again.
    Shortcode API

    Thread Starter jazzylee77

    (@jazzylee77)

    Okay, I’ll probably sleep on it. Might be some other way to get there. Maybe insert from custom fields…

    Thanks all for the help.

    Thread Starter jazzylee77

    (@jazzylee77)

    ah… haven’t used shortcode before. Time to study up.

    Thread Starter jazzylee77

    (@jazzylee77)

    Just thought I’d let you know, I found a nice workaround.

    Since the image and sharing code boxes appear at the top of every post where I use them, I added a custom field image-key and threw this in my themes Single Post (single.php)

    <?php get_custom_field_value('image-key', true);?>

    I have an excel page setup so I now just enter 3 fields — the post slug, image filename, and alt. All the rest is in the worksheet and I copy from a concatenated field and paste into the posts custom field.

    Works like a charm.

    Thanks for the help again. Sometimes knowing what doesn’t work is half the battle.

    Perfect. Glad you were able to get it worked out.

Viewing 12 replies - 16 through 27 (of 27 total)
  • The topic ‘Truncated html form data — should I mess with data type in tables?’ is closed to new replies.