3 Replies Latest reply on Jan 29, 2013 10:38 AM by beeg59

    Content limitations when creating a document with Rest API

      I'm able to create a document using Rest API but there seem to be a lot of restrictions on what can be put in the content.  Only very simple html seems to work and even that gets modified on input.


      I'm experimenting with taking some html formatted data off a different server and putting it into Jive.  I am trying to send the data below.  The document gets created with the status, subject, type, and visibilty but the content does not appear.  I played around and was able to get some simple html into document.  So I assume there are issues with the complexity of my data.


      Even something simple like:


      <a href='http:www.support.unisys.com'>test</a>


      When I view it in the editor, shows up as:




      The href was dropped.


      So can anyone give me guidance on how I can get the data below stored as the content?  Is there any documentation that states what is allowed in the content?








      "text":"<style type=\"text/css\">\r\nspan.h4{color:#D31145;font-size:12px;font-weight:bold}\r\n</style>\r\n<table width=\"600px\" border=\"1\" cellpadding=\"3\" cellspacing=\"0\">\r\n<tr><td style=\"background-color:#fafad2\">\r\n<a href=\"https://www.support.unisys.com/all/ple/16701475?pla=ps&nav=ps\">\r\nView the full details of this PLE</a> on the Unisys\r\nProduct Support site.</td></tr></table>\r\n<pre>\r\nProduct:   PRIMUS\r\nProblem Reporting, Integration, and Maintenance for Unisys Systems\r\nComponent: PRIMUS                      Date Prepared:    April 24, 1996\r\nForm:      TROUBLE REPORT              Date Updated:     March 24, 2011\r\nAffected Level:    7R3\r\nHost Processor:    2200/500\r\nAffected UCFs:     33881111\r\nKeyword:           TALLY-COMMAND\r\n</pre><span class=\"h4\">Symptoms:</span><pre>\r\nIn PRIMUS 7R2, an attempt to TALLY a substring of a NUMERIC field worked\r\nfine.  In PRIMUS 7R3, it not allowed.\r\n</pre>\r\n</pre><span class=\"h4\">Technical Explanation:</span><pre>\r\nIn PRIMUS 7R3, the TALLY command processing was changed so that NUMERIC\r\nfields were treated the same as INTEGER fields so that they sort properly.\r\nThis caused the above problem.  A NUMERIC field with a CHARACTERS clause\r\nwill now be treated the same as it was in 7R2.\r\n</pre>\r\n</pre><span class=\"h4\">Resolution Details:</span><pre>\r\n<HR SIZE=\"1\">\r\nResolution for Level: 7R3\r\nResolution Status:    FIX AVAILABLE\r\nResolved with Change: 00076-03801-PCR\r\nFixed in Release:     PRIMUS-7R4\r\n</pre>\r\n</pre>\r\n"



      "subject":"TALLY of NUMERIC field with CHARACTERS clause regression Updated!",




        • Re: Content limitations when creating a document with Rest API

          Brian Graves,

          You think there would be a simple answer but.... It turns out there is a LOT of processing that happens when content comes into Jive. Because of the different processing and filtering, LOTS of HTML gets stripped. Granted, there's some basic HTML that should always come through.


          Now, one way that I've done stuff like this in the past is...


          Create an example doc in your jive instance. Edit that doc and look at what gets generated. Use that as the template of what you pass into Jive.



          Let me know if this works!

          • Re: Content limitations when creating a document with Rest API


            I circled back with the RTE wizard on the dev team. Here's a bit more info...

            Dynamic content is not allowed.  We do not allow style elements, scripts, applets, embeds, objects, iframes, elements new to HTML 5, or anything that might possibly interfere with rendering this HTML snippet inside the same document.  Data attributes are probably fine, if you need to store a little metadata.  Style attributes will probably be preserved, but should be avoided.


            Your markup should be Well-Formed XHTML (but don't use self-closing tags for non-empty elements: <img /> and <br /> are fine; <span /> is not).  Your URLs must be grammatically correct.  Internal links (to content on the Jive instance) are a bit tricky, but can be made to work. (Note: if you are using an app, make sure to use a deep link.)