• 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 15 replies - 1 through 15 (of 27 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    I think that you actually can’t just paste the HTML for a form into a post (or page). You should use a form plugin, like TDO forms.

    I would not recommend that. It’s just possible that you’re hitting a problem with your host’s server security. It might be worth having a word with them about it.

    Thread Starter jazzylee77

    (@jazzylee77)

    Thanks to both. I’ll check both clues out.

    I think that you actually can’t just paste the HTML for a form into a post (or page).

    I disagree. What about PayPal forms or email subscription forms? I agree that the code for the above form wouldn’t do a thing if it was untouched but the markup shouldn’t be truncated by the HTML editor.

    Thread Starter jazzylee77

    (@jazzylee77)

    One other thing. I am able to successfully post a similar form with shorter content. That’s why I’m thinking it could be a character length issue.

    are you using the Visual editor? if so try using the HTML one.

    Thread Starter jazzylee77

    (@jazzylee77)

    This is just a form I sometimes use for sharing an image.

    Would be nice if some gallery included a way of photo sharing like this; where you could pull an image into a post with the form and visitors could click and copy html and bbc sharing codes as photobucket and others do.

    Thread Starter jazzylee77

    (@jazzylee77)

    no, wasn’t using visual editor. pasted in html editor

    Are you only viewing it in HTML mode, or are you at some point switching over to the visual editor? Is it really pasting in differently than you copied it; or is it only changing after you save the post?

    I agree that the HTML editor should not be changing any of your code when you paste it in; but switching back to the visual editor for any reason will attempt to validate and sanitize your code; and saving the post will send it through various validation/sanitization functions, too.

    That said, there are multiple issues I see with the form code, though; and that might be why it’s getting messed up the editor.

    1. Instead of using an <input>, you should probably be using a <textarea> (though this may or may not be having an effect)
    2. The HTML code you’re using as the “value” attribute in the input is invalid. The editor is most likely trying to fix the invalid markup, which is resulting in the code being truncated.
    3. Finally, the opening and closing angle brackets (“<” & “>”) should probably be encoded as & lt; and & gt; (with no spaces in either of those; but I can’t figure out how to get this to stop unencoding the entities) when used inside the value attribute

    In that case, deactivate all plugins, and change to twentyten theme and try again. If that fixes it, then reactivate one by one until a culprit is found.

    oh and who is your webhost?

    Thread Starter jazzylee77

    (@jazzylee77)

    It literally pastes differently in the html editor.

    I do check it in the visual editor as well, but it truncates the code before I change views.

    this form works fine for the bbc code, though it doesn’t need all that encoding for <> =

    <form> <input class="showImageTextBox" style="border-color: #555555;" onclick="this.form.showImage1.select()" onmouseover="this.style.borderColor='#FFC533'" onmouseout="this.style.borderColor='#555555'" name="showImage1" size="20" type="text" value="[URL=https://www.mysite.com/the-topic][IMG]https://www.mysite.com/stash/image.gif[/IMG][/URL]" />
    
    </form>

    Forms obviously aren’t my strong suit. I just generated this bit of code from frontpage.

    Thread Starter jazzylee77

    (@jazzylee77)

    host is site5

    With your host being Site5, I can tell you with 99% certainty that this is not an issue with your server. I manage about 10 different WordPress websites on 5 different Site5 accounts, and cannot reproduce this problem.

    As Rich suggested, I would recommend deactivating all of your plugins and switching your theme to Twenty Ten temporarily to see if that stops the issue. If it does, then start putting things back the way they were one-by-one to see if you can figure out where the issue is popping up.

    Also, just in case it has any impact on the situation, what browser are you using?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    What about PayPal forms or email subscription forms?

    Maybe I should say ‘Complicated forms’? Though maybe all my problems are mod_security related… I’ve never had it work right.

    Thread Starter jazzylee77

    (@jazzylee77)

    okay, shutting down plugins and checking in 2010 theme… drag ??

    using firefox 3.6xxx

    I’ll check it in IE before stripping it down.

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