Skip to content

HTML entities displayed in Dashboard greeting #24645

Closed

Description

@weierophinney

Steps to reproduce

  1. Set your full name to include an apostrophe ('), such as in my own full name ("O'Phinney").
  2. Visit the Dashboard

Expected behaviour

The dashboard greeting should display the full name without escaping HTML entities; e.g. Good morning, Matthew Weier O'Phinney.

Actual behaviour

The dashboard escapes HTML entities: Good morning, Matthew Weier O'Phinney.

Server configuration detail

Operating system: Linux 5.4.0-52-generic #57-Ubuntu SMP Thu Oct 15 10:57:00 UTC 2020 x86_64

Webserver: Apache (fpm-fcgi)

Database: mysql 5.7.32

PHP version:

7.4.13
Modules loaded: Core, date, libxml, openssl, pcre, zlib, bcmath, bz2, ctype, curl, dom, hash, fileinfo, filter, ftp, gd, gmp, SPL, iconv, intl, json, ldap, mbstring, pcntl, PDO, session, posix, Reflection, standard, SimpleXML, mysqlnd, exif, tokenizer, xml, xmlreader, xmlwriter, zip, pdo_mysql, cgi-fcgi, redis, Zend OPcache

Nextcloud version: 20.0.2 - 20.0.2.2

Updated from an older Nextcloud/ownCloud or fresh install: updated (via snap)

Where did you install Nextcloud from: snap

Signing status

Array
(
)

List of activated apps
Enabled:
 - accessibility: 1.6.0
 - activity: 2.13.3
 - admin_audit: 1.10.0
 - apporder: 0.11.0
 - calendar: 2.1.2
 - cloud_federation_api: 1.3.0
 - comments: 1.10.0
 - contactsinteraction: 1.1.0
 - dashboard: 7.0.0
 - dav: 1.16.1
 - deck: 1.2.2
 - federatedfilesharing: 1.10.1
 - federation: 1.10.1
 - files: 1.15.0
 - files_external: 1.11.1
 - files_markdown: 2.3.1
 - files_pdfviewer: 2.0.1
 - files_rightclick: 0.17.0
 - files_sharing: 1.12.0
 - files_trashbin: 1.10.1
 - files_versions: 1.13.0
 - files_videoplayer: 1.9.0
 - firstrunwizard: 2.9.0
 - issuetemplate: 0.7.0
 - logreader: 2.5.0
 - lookup_server_connector: 1.8.0
 - metadata: 0.12.0
 - music: 0.17.3
 - news: 15.1.0
 - nextcloud_announcements: 1.9.0
 - notes: 4.0.1
 - notifications: 2.8.0
 - oauth2: 1.8.0
 - password_policy: 1.10.1
 - photos: 1.2.0
 - privacy: 1.4.0
 - provisioning_api: 1.10.0
 - recommendations: 0.8.0
 - serverinfo: 1.10.0
 - settings: 1.2.0
 - sharebymail: 1.10.0
 - support: 1.3.0
 - survey_client: 1.8.0
 - suspicious_login: 3.2.1
 - systemtags: 1.10.0
 - tasks: 0.13.6
 - text: 3.1.0
 - theming: 1.11.0
 - twofactor_backupcodes: 1.9.0
 - twofactor_totp: 5.0.0
 - twofactor_u2f: 6.0.0
 - user_status: 1.0.1
 - viewer: 1.4.0
 - weather_status: 1.0.0
 - workflowengine: 2.2.0
Disabled:
 - cookbook
 - encryption
 - files_downloadactivity
 - files_readmemd
 - passman
 - qownnotesapi
 - quicknotes
 - ransomware_protection
 - registration
 - twofactor_email
 - user_ldap

Configuration (config/config.php)
{
    "apps_paths": [
        {
            "path": "\/snap\/nextcloud\/current\/htdocs\/apps",
            "url": "\/apps",
            "writable": false
        },
        {
            "path": "\/var\/snap\/nextcloud\/current\/nextcloud\/extra-apps",
            "url": "\/extra-apps",
            "writable": true
        }
    ],
    "supportedDatabases": [
        "mysql"
    ],
    "memcache.locking": "\\OC\\Memcache\\Redis",
    "memcache.local": "\\OC\\Memcache\\Redis",
    "redis": {
        "host": "***REMOVED SENSITIVE VALUE***",
        "port": 0
    },
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "localhost",
        "cloud.mwop.net"
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "dbtype": "mysql",
    "version": "20.0.2.2",
    "overwrite.cli.url": "http:\/\/localhost",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbport": "",
    "dbtableprefix": "oc_",
    "mysql.utf8mb4": true,
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "installed": true,
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "objectstore": {
        "class": "\\OC\\Files\\ObjectStore\\S3",
        "arguments": {
            "bucket": "cloud-mwop-net",
            "key": "***REMOVED SENSITIVE VALUE***",
            "secret": "***REMOVED SENSITIVE VALUE***",
            "hostname": "cloud-mwop-net.nyc3.digitaloceanspaces.com",
            "region": "nyc3",
            "port": 443,
            "use_ssl": true,
            "use_path_style": true
        }
    },
    "maintenance": false,
    "theme": "",
    "loglevel": 0
}

Are you using external storage, if yes which one: DigitalOcean Spaces

Are you using encryption:

Are you using an external user-backend, if yes which one: none

Client configuration

Browser: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36

Operating system: Ubuntu 20.04

Logs

Web server error log
Insert your web server log here 
Nextcloud log
Insert your Nextcloud log here
Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...

Activity

  1. added
    0. Needs triage
    on Dec 10, 2020
  2. HLFH commented on Apr 29, 2021

    @HLFH
    Contributor

    I can reproduce this issue. Related to js/dashboard.js file and probably to greeting.text element.

    To fix it in js/dashboard.js, replace e.greeting.text by:

    $('<textarea/>').html(e.greeting.text).val()

  3. HLFH commented on Apr 29, 2021

    @HLFH
    Contributor

    Fixed by PR #26831

  4. added
    1. to develop
    and removed
    0. Needs triage
    on May 6, 2021
  5. szaimen commented on Jul 14, 2021

    @szaimen
    Contributor

    Fixed in #27912

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    1. to developbugfeature: dashboard

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions