Changeset 40fc49 in indico


Ignore:
Timestamp:
01/31/12 15:36:07 (16 months ago)
Author:
Pedro Ferreira <jose.pedro.ferreira@…>
Branches:
master, hello-world-walkthrough, ipv6, v0.98-series, v0.98.2, v0.98.3, v0.98b2, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, d9941f8582b36b24821a11ea5ba16fda6a457fb1
Children:
d9d4d7
Parents:
025d21
git-author:
Pedro Ferreira <jose.pedro.ferreira@…> (01/31/12 15:34:51)
git-committer:
Pedro Ferreira <jose.pedro.ferreira@…> (01/31/12 15:36:07)
Message:

[FIX] Take line breaks into account

File:
1 edited

Legend:

Unmodified
Added
Removed
  • indico/htdocs/js/indico/Core/Widgets/Inline.js

    r842982 r40fc49  
    15691569            _handleDisplayMode: function(value) { 
    15701570                if (value) { 
    1571                     this.comments = Html.span({}, value); 
    1572                     return this.comments; 
     1571                    // start by escaping the input 
     1572                    var dummy = $('<span/>').text(value); 
     1573                    value = dummy.text(); 
     1574 
     1575                    // now transform double line breaks into paragraphs 
     1576                    value = '<p>' + value.replace('\n\n', '</p><p>') + '</p>'; 
     1577                    return Html.unescaped.span({}, value); 
    15731578                } else { 
    15741579                    return; 
    15751580                } 
    1576  
    15771581            }, 
    15781582 
Note: See TracChangeset for help on using the changeset viewer.