@@ -233,8 +233,12 @@ module.exports = {
233233 topic . usage = topic . usage . contents ;
234234 }
235235
236+ if ( topic . description !== null && typeof topic . description === 'object' ) {
237+ topic . description = topic . description . contents ;
238+ }
239+
236240 topic . examples = sanitizeHtml ( topic . examples , {
237- allowedTags : [ 'a' ] ,
241+ allowedTags : [ ] ,
238242 allowedAttributes : { }
239243 } ) ;
240244
@@ -315,11 +319,6 @@ module.exports = {
315319 'sourceJSON' ] )
316320 ) ;
317321
318- var topicArguments = _ . isEmpty ( rdJSON . arguments ) ? [ ] : rdJSON . arguments . map ( function ( argument ) {
319- var arg = _ . mapValues ( argument , arrayToString ) ;
320- return _ . merge ( { } , arg , { topic_id : topicInstance . id } ) ;
321- } ) ;
322-
323322 var aliases = rdJSON . aliases && ! ( rdJSON . aliases instanceof Array ) ? [ rdJSON . aliases ] : rdJSON . aliases ;
324323 var aliasesRecords = _ . isEmpty ( aliases ) ? [ ] : aliases . map ( function ( alias ) {
325324 return { name : alias , topic_id : topicInstance . id } ;
@@ -332,10 +331,8 @@ module.exports = {
332331 } ) ;
333332
334333 return Promise . all ( [
335- topicInstance . removeArguments ( topicInstance . arguments ) ,
336334 topicInstance . removeSections ( topicInstance . sections ) ,
337335 topicInstance . removeAliases ( topicInstance . aliases ) ,
338- Argument . bulkCreate ( topicArguments , { transaction : t } ) ,
339336 Alias . bulkCreate ( aliasesRecords , { transaction : t } ) ,
340337 Section . bulkCreate ( sections , { transaction : t } ) ,
341338 topicInstance . setKeywords ( keywordsInstances , { transaction : t } ) ,
0 commit comments