enthought / enthought/traitsui

Qt HTMLEditor base_url is assumed to be a path that is not an URL

Open
#820 1 comment 0 reactions 0 assignees View on GitHub
toolkit: Qt
Dominant language
Python
Stars
306
Forks
99
PR merge metrics
No merged PRs in 30d

Description

For the Qt implementation of `HTMLEditor`, the `base_url` is assumed to be a local path that is not a URL, as it is passed to `QUrl.fromLocalFile`.
https://github.com/enthought/traitsui/blob/bf5b6884d6a7feb6ebe603fdbef967d7583e9f23/traitsui/qt4/html_editor.py#L76
See https://doc.qt.io/qt-5/qurl.html#fromLocalFile

A URL like `"file:///Users"` will end up being `"file:file:///Users"`.

The editor works if `base_url` is not a URL, e.g. `/Users`.

The wx implementation tries to accommodate a few of these schemes:
https://github.com/enthought/traitsui/blob/bf5b6884d6a7feb6ebe603fdbef967d7583e9f23/traitsui/wx/html_editor.py#L54-L57

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.