Menu

#380 Markup in "fulldescription" vocabulary displayed in hover box when entry.description is mandatory

Future_Requests
open
nobody
None
1
2017-03-08
2017-03-07
No

Hi,
Whilst configuring version 1.6.0 I noticed after setting $is_mandatory_field['entry.description'] = true; that hovering over the full description text box in edit_entry.php displays a hover box tooltip stating:

"Full description:
  (Number of people,
  Internal/External etc.)" is a mandatory field, please supply a value.

i.e. the
tags and   spaces used in the lang file to make the field description sit nicely next to the text box are shown in the hover box. Picture attached.
The version I'm upgrading from (1.4.10) just shows "This is a required field".

1 Attachments

Discussion

  • Andrew Hardisty

    Andrew Hardisty - 2017-03-07

    Oh, shouldn't have used the quote tag as it's tidied it up when displayed here!

    The hover box contains:

    "Full description:<br>&nbsp;&nbsp;(Number of people,<br>&nbsp;&nbsp;Internal/External etc.)" is a mandatory field, please supply a value.
    
     
  • Campbell Morrison

    Yes, this has been fixed in the default branch (yesterday in fact!). The default label has been changed to just "Full Description", so you won't get the problem in future. (The rest of the label was less than helpful as there's a separate field for Internal/External). You could patch your existing system by adding to your config file:

    $vocab_override['en']['fulldescription'] = "Full description";
    

    As a precaution I'll also change the code to strip out any HTML tags etc., just in case there are any other labels with HTML in them.

     
  • Campbell Morrison

    I've now changed the code in the default branch to strip out HTML tags and entities. See 40312b.

    If you want to patch a 1.6.1 system then change line 269 of js/edit_entry.js.php from

            validationMessages.vocab[key] = label.html();
    

    to

            validationMessages.vocab[key] = label.text();
    
     
  • Andrew Hardisty

    Andrew Hardisty - 2017-03-08

    Another brilliantly prompt respone. Thanks very much.
    I haven't gone live with 1.6.0 yet so I'll replace it with 1.6.1 and make that change.

     
MongoDB Logo MongoDB