Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Andreas Pfanner 196 posts 314 karma points
    Apr 26, 2013 @ 12:56
    Andreas Pfanner
    0

    target="_blank"

    Hi,

    I am having a XHTML 1.0 Strict website, so no target="_blank" attribute is allowed on links to have valid markup.

    Since RTE allows to create links with target="_blank" this could break markup validation.

    I am wondering how others are handling that problem? My first thought was to remove the a[target] attribute from tinyMceConfig (validElements), but if the functionality should remain, that is no option. Can I replace all occurences of target="_blank" before the page output is sent to the browser, and set a class instead in order to open in a new window by javascript/jquery?

    Any suggestions?


    Best Regards
    Andreas

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Apr 26, 2013 @ 13:02
    Jan Skovgaard
    0

    Hi Andreas

    I think it's important to remember this..."Validation is not a religion, it's a tool". Sometimes you just have to be practical and focus on the pros and cons of the approach. I must honestly say that I think it's too much work and effort to put into something that really does not matter for the user experience and has no real value for the client.

    An easy way to fix it would be to simply change the doctype to <!DOCTYPE html> - That' the doctype for HTML5 that supports the XHTML syntax.

    Don't get me wrong I'm all for standards and valid code but remember my quote above.

    Just my 2 cents on the issue :)

    Cheers,
    Jan 

  • Andreas Pfanner 196 posts 314 karma points
    Apr 26, 2013 @ 13:11
    Andreas Pfanner
    0

    Hi Jan,

    good point, thank you, but doing so, I get some other errors for the RTE generated tables:

    The value of the border attribute on the table element must be either 1 or the empty string. To regulate the thickness of table borders, Use CSS instead.

    The cellspacing attribute on the table element is obsolete. Use CSS instead.

    The align attribute on the tr element is obsolete. Use CSS instead.

    Isn't TinyMCE able yet to produce HTML5 conform output? Or can I set something on TineMCE in order to get that?

    Best Regards

    Andreas 

     
  • Funka! 398 posts 661 karma points
    Apr 30, 2013 @ 19:32
    Funka!
    0

    Cross your fingers and hold your breath for CKEditor support one day in the Umbraco back-end instead of TinyMCE!

    (Sorry, I know this isn't helpful to solve your problem, but misery loves comfort?)

Please Sign in or register to post replies

Write your reply to:

Draft