Hi,

I would like to use the "use page link" option to display my T&Cs yet the legal page is not fendering in HTML, just a massive wall of text.

Can this be fixed please as the feature of using a separate page is useless without the formatting option for the page.

Thanks,

Shaun

CommentFileSizeAuthor
#10 legal_page_htmlformatted-1376058-10.patch406 bytesanybody

Comments

jim005’s picture

+1

mcfilms’s picture

Yes please.

marty.true’s picture

I was able to manipulate this but creating a separate page, using a Full HTML input filter, and after saving it, I went back to edit screen of that page, clicked "Source" and copied the HTML output and then went to the Legal module and pasted that in the textarea... It does render in HTML if the tags are in there.

But I agree, the module should utilize Drupal's input filters hook for that textarea...

lindsayo’s picture

@xstatic, I did the same thing which worked for authenticated viewing, but still am finding that the anonymous rendering of /legal is completely unformatted. I'm using 6.x-8.5, but this seems to be a universal issue?

anybody’s picture

Category: Support request » Bug report
Issue summary: View changes

The problem still exists and is a clear bug, because the output is different from other displays. All linebreaks are missing, etc. that should NOT be the case.

Clear bug which makes this display style nearly impossible to use without hacking!

anybody’s picture

The responsible code can be found in "legal.pages.inc" in these lines:

case 3: // Page Link.
      $output = filter_xss_admin($conditions['conditions']);
      break;

If the only problem are missing linebreaks, this could be fixed by simply adding an "nl2br()".

switch (variable_get('legal_display', '0')) {
    case 0: // Scroll Box.
      $output = nl2br(strip_tags($conditions['conditions']));
      break;
    case 1: // CSS Scroll Box with HTML.
    case 2: // HTML.
    case 3: // Page Link.
      $output = nl2br(filter_xss_admin($conditions['conditions']));
      break;
  }
anybody’s picture

This should be definitely fixed in the next stable release from my point of view, because it's a clear bug and can't create more problems than already existing. The output is now identical to the Scroll box. Who's able to make that change?

anybody’s picture

Is there still an active maintainer in this module? Otherwise I'd like to offer my help to bring the changes in...

robert castelo’s picture

Yes, actively maintained. Please provide a patch for review.

anybody’s picture

StatusFileSize
new406 bytes

Patch attached :)

anybody’s picture

Status: Active » Needs review
geek-merlin’s picture

Status: Needs review » Closed (won't fix)
Related issues: +#445308: Add support of text formats and WYSIWYG

Afaict this code is already included in #445308: Add support of text formats and WYSIWYG.

geek-merlin’s picture

Status: Closed (won't fix) » Closed (duplicate)