• Resolved desertmariner

    (@desertmariner)


    Either TinyMCE or WP are driving me nuts! I’ve disabled the visual editor for writing so I can put in straight html. I put the following href anchor onto a page:

    <a href="https://website.com/func/?search=Asearch 1; Bsearch 2 &param=31">website link text</a>

    I save the page and preview it. This is what WordPress sends to my Firefox browser:

    <a href="http: &param="31" target="_blank"" 1="" Bsearch="" 2;="" ?search="Asearch" func="" website.com="">website link text</a href="http:>

    I have TinyMCE Advanced installed and active, and TinyMCE Valid Elements installed and active. The only elements and attributes I have entered into TinyMCE Valid Elements are:
    a, target, href

    If I save the page, and close it, and then open it again, the code is unchanged, so I don’t know if the problem is WP or TinyMCE. I’d sure appreciate some help.

    Thank.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter desertmariner

    (@desertmariner)

    Update:

    I looked in the database to see how the page is being stored. The code is storing correctly, so this is probably not a TinyMCE issue but rather a WP issue. It looks like WP is rearranging the the html on the way to the browser. Am I failing to escape some special characters or something?

    Thread Starter desertmariner

    (@desertmariner)

    Update #2:

    I wrote a quick plugin to use the exact same code. It works fine. So, the same anchor tag works in a plugin (and I pull the code from a database field just like the page does), but it doesn’t work in a page. Frustrating!

    esmi

    (@esmi)

    Have you tried deactivating TinyMCE Advanced and TinyMCE Valid Elements?

    Thread Starter desertmariner

    (@desertmariner)

    Yes, I have deactivated both plugins. I get the same result.

    esmi

    (@esmi)

    Any other plugins running? If so, have you tried deactivating them or resetting the plugins folder by FTP or phpMyAdmin? Sometimes, an apparently inactive plugin can still cause problems.

    Have you tried switching to the default theme to rule out any theme-related problems? Or re-uploading the wp-admin and wp-includes folders from a fresh download of WP?

    Thread Starter desertmariner

    (@desertmariner)

    I deactivated all plugins (renamed the plugins directory), switched to the default theme, and uploaded fresh copies (freshly downloaded from www.remarpro.com) of both wp-admin and wp-includes. No help. WordPress is still scrambling this anchor code.

    Thread Starter desertmariner

    (@desertmariner)

    Now I’m REALLY baffled! I went into the editor and entered the exact same link using the editor “Link” button. The code deposited by the editor into the edit screen is EXACTLY the same as the hand coded anchor I typed into the editor, yet when I preview the page the one entered with the “Link” button renders correctly while the hand entered one is scrambled.

    I further looked at the post content field in the database. Both links are shown in the field and both are identical. I don’t get it! I’m very experienced in relational database. I’ve looked through the tables and can’t see any data relationships that tell wordpress that one is a valid link and the other isn’t.

    I need to put 730 of these links on the page, so it makes no sense to have to hand enter each one. There HAS to be a secret key to this problem.

    Thread Starter desertmariner

    (@desertmariner)

    I can’t tell you how much I HATE Microsoft sometimes. The code I’m trying to use I created in Excel. I copied the code out of Excel and into Notepad thinking it would clean it of any non-printing characters. I would then save the .txt file, reopen it cut the code out of it and paste it into wordpress. Apparently this isn’t enough! Saving the data from Excel as text isn’t enough either! You have to cut it out of Excel, paste it into Word, save the word file as “plain text”, open that file, cut the text out of it and paste it into WordPress. THEN it works! I HATE Microsoft! If notepad says it saves in .txt format, one would expect it to save clean text! I HATE Microsoft! Issue resolved. Thanks for listening.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘WP bizarre code rewriting’ is closed to new replies.