Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Stored image files manager doesn't correctly handle images with parentheses in the filename #3215

Closed
Leopold702 opened this issue Jan 26, 2025 · 7 comments
Labels

Comments

@Leopold702
Copy link

Expected behaviour

Stored image files manager ("Edit" > "Manage stored image files") should display all notes in which the image is used in the "Used in notes" section.

Actual behaviour

If an image file contains parentheses in its filename, the stored image files manager doesn't display notes in which the image is used in the "Used in notes" section.

Steps to reproduce

Steps to reproduce the behavior:

  1. Insert an image, with parentheses in its filename, into a note (e.g. using "Insert image" option)
  2. Navigate to "Edit" > "Manage stored image files"
  3. Select the image in question and check the "Used in notes" section (it will be missing)

Screenshots

Filename without parentheses

Filename with parentheses

Note

Output from the debug section in the settings dialog

Expand

QOwnNotes Debug Information

General Info

Current Date: Вс янв 26 14:40:16 2025
Version: 24.12.6
Build date: Dec 23 2024
Build number: 1148
Platform: windows (windows)
Operating System: Windows 10 Version 2009
Build architecture: x86_64
Current architecture: x86_64
Release: GitHub Actions
Qt Version (build): 5.15.2
Qt Version (runtime): 5.15.2
Portable mode: no
Settings path / key: \HKEY_CURRENT_USER\Software\PBE\QOwnNotes
Application database path: C:\Users\Work\AppData\Roaming\PBE\QOwnNotes\QOwnNotes.sqlite
Application arguments: C:\Users\Work\Downloads\QOwnNotes\QOwnNotes.exe, C:\Users\Work\Downloads\QOwnNotes\QOwnNotes.exe, C:\Users\Work\Downloads\QOwnNotes\QOwnNotes.exe, --allow-multiple-instances
Qt Debug: 0
Locale (system): ru_RU
Locale (interface): en
Primary screen resolution: 1366x768
Icon theme: breeze-qownnotes
Notes in current note folder: 14
Calendar items: 0
Enabled scripts: 0
Database drivers: QSQLITE, QODBC, QODBC3, QPSQL, QPSQL7

Server Info

serverUrl: empty
appIsValid: no
notesPathExists: empty
connectionErrorMessage: empty

Spellchecking

Enabled: true
Selected language: en_US
Language codes: en_US
Language names: American English (United States)
Application dictionaries path: C:\Users\Work\AppData\Roaming\PBE\QOwnNotes\dicts

Note folders

currentNoteFolderId: 1

Note folder Notes

id: 1
isCurrent: yes
activeTagId: 0
localPath: C:\Users\Work\Notes
remotePath: Notes
cloudConnectionId: 1
isShowSubfolders: yes
isUseGit: no
allowDifferentNoteFileName: no
activeNoteSubFolder name: empty
database file: C:\Users\Work\Notes\notes.sqlite

Cloud connections

Cloud connection По умолчанию

id: 1
isCurrent: yes
serverUrl: empty
username: empty
accountId: empty

Enabled scripts

Settings

AboutDialog/geometry (QByteArray): <binary data>
ActiveNoteHistoryItem (NoteHistoryItem): <binary data>
Debug/fakeOldVersionNumber (bool): false
Debug/fileLogging (bool): false
DictionaryManagerDialog/geometry (QByteArray): <binary data>
DictionaryManagerDialog/mainSplitterState (QByteArray): <binary data>
DistractionFreeMode/editorWidthMode (int): 5
DistractionFreeMode/isEnabled (QString): false
DistractionFreeMode/menuBarGeometry (QByteArray): <binary data>
DistractionFreeMode/menuBarHeight (int): 21
DistractionFreeMode/menuBarVisible (QString): true
DistractionFreeMode/windowState (QByteArray): <binary data>
Editor/CurrentSchemaKey (QString): EditorColorSchema-6033d61b-cb96-46d5-a3a8-20d5172017eb
Editor/autoBracketClosing (bool): true
Editor/autoBracketRemoval (bool): true
Editor/disableCursorBlinking (bool): false
Editor/editorWidthInDFMOnly (bool): true
Editor/highlightCurrentLine (bool): true
Editor/indentSize (int): 4
Editor/removeTrailingSpaces (bool): false
Editor/showLineNumbers (bool): false
Editor/useTabIndent (bool): false
Editor/vimMode (bool): false
FileDialog/LastPath (QString): C:/Users/Work/Downloads
FileDialog/LastPath-InsertImage (QString): C:/Users/Work/Downloads
ImageDialog/disableCopying (bool): false
ImageDialog/geometry (QByteArray): <binary data>
IssueAssistantDialog/geometry (QByteArray): <binary data>
LastUpdateCheck (QDateTime): 2025-01-26T14:00:23.138
LinkDialog/geometry (QByteArray): <binary data>
LocalTrashDialog/geometry (QByteArray): <binary data>
MainWindow/geometry (QByteArray): <binary data>
MainWindow/mainToolBar.iconSize (int): 24
MainWindow/menuBarGeometry (QByteArray): <binary data>
MainWindow/noteSubFolderTreeWidgetExpandState-1 (QStringList): REMOVED
MainWindow/noteTextEdit.code.font (QString): Courier New,10,-1,2,50,0,0,0,0,0
MainWindow/noteTextEdit.font (QString): Courier New,10,-1,5,50,0,0,0,0,0,Regular
MainWindow/noteTextView.code.font (QString): Courier New,9,-1,2,50,0,0,0,0,0
MainWindow/noteTextView.font (QString): MS Shell Dlg 2,8.25,-1,5,50,0,0,0,0,0
MainWindow/noteTextView.ignoreCodeFontSize (bool): true
MainWindow/noteTextView.refreshDebounceTime (int): 600
MainWindow/noteTextView.rtl (bool): false
MainWindow/noteTextView.underline (bool): false
MainWindow/noteTextView.useEditorStyles (bool): true
MainWindow/noteTextView.useInternalExportStyling (bool): true
MainWindow/showNotesFromAllNoteSubFolders (bool): false
NoteFolder-1/NoteTabNameList (QStringList): Test checklist
NoteFolder-1/NoteTabStickinessList (QStringList): empty
NoteFolder-1/NoteTabSubFolderPathDataList (QStringList): empty
NoteFolder-1/allowDifferentNoteFileName (QString): false
NoteHistory-1 (QVariantList): <variant list with 49 item(s)>
NoteHistoryCurrentIndex-1 (int): 48
PasswordDialog/geometry (QByteArray): <binary data>
PiwikClientId (QString): <hidden>
SearchEngineId (int): 2
SettingsDialog/geometry (QByteArray): <binary data>
SettingsDialog/mainSplitterState (QByteArray): <binary data>
ShowSystemTray (bool): false
StartHidden (bool): false
StoredAttachmentsDialog/geometry (QByteArray): <binary data>
StoredImagesDialog/geometry (QByteArray): <binary data>
UpdateDialog/geometry (QByteArray): <binary data>
WelcomeDialog/geometry (QByteArray): <binary data>
acceptAllExternalModifications (bool): false
ai/groq/apiKey (QString): <hidden>
ai/openai/apiKey (QString): <hidden>
allowNoteEditing (bool): true
allowOnlyOneAppInstance (bool): true
appMetrics/disableAppHeartbeat (bool): false
appMetrics/disableTracking (bool): false
appMetrics/notificationShown (QString): true
autoReadOnlyMode (bool): false
autoReadOnlyModeTimeout (int): 30
automaticNoteFolderDatabaseClosing (bool): false
checkSpelling (bool): true
closeTodoListAfterSave (bool): false
cryptoKey (qlonglong): <hidden>
currentNoteFolderId (int): 1
currentWorkspace (QString): initial
cursorWidth (int): 1
darkMode (bool): false
darkModeColors (bool): false
darkModeIconTheme (bool): false
darkModeTrayIcon (bool): false
defaultNoteFileExtension (QString): md
demoNotesCreated (QString): true
disableAutomaticUpdateDialog (bool): true
disableSavedSearchesAutoCompletion (bool): false
dockWasInitializedOnce (QString): true
enableNoteTree (bool): false
enableSocketServer (bool): true
enableWebAppSupport (bool): false
externalEditorPath (QString): empty
fullyHighlightedBlockquotes (bool): false
gitCommitInterval (int): 30
gitExecutablePath (QString): empty
gitLogCommand (QString): empty
guiFirstRunInit (bool): true
ignoreAllExternalModifications (bool): false
ignoreAllExternalNoteFolderChanges (bool): false
ignoreNoteSubFolders (QString): ^\.
ignoredNoteFiles (QString): empty
imageScaleDown (bool): false
imageScaleDownMaximumHeight (int): 1024
imageScaleDownMaximumWidth (int): 1024
initialLayoutIdentifier (QString): minimal
insertTimeFormat (QString): empty
interfaceFontSize (int): 11
interfaceLanguage (QString): en
internalIconTheme (bool): false
itemHeight (int): 15
legacyLinking (bool): false
localTrash/autoCleanupDays (int): 30
localTrash/autoCleanupEnabled (bool): true
localTrash/supportEnabled (bool): true
localTrashSplitterSizes (QByteArray): <binary data>
markdownHighlightingEnabled (bool): true
maxNoteFileSize (int): 1048576
navigationPanelAutoSelect (bool): true
navigationPanelHideSearch (bool): false
networking/ignoreSSLErrors (bool): true
networking/proxyType (int): 2
newNoteAskHeadline (bool): false
noteEditIsCentralWidget (bool): false
noteFileExtensionList (QStringList): md, txt
noteListPreview (bool): false
noteSaveIntervalTime (int): 10
noteSubfoldersPanelDisplayAsFullTree (bool): false
noteSubfoldersPanelHideSearch (bool): false
noteSubfoldersPanelOrder (int): 0
noteSubfoldersPanelShowFullPath (bool): false
noteSubfoldersPanelShowNotesRecursively (bool): false
noteSubfoldersPanelShowRootFolderName (bool): false
noteSubfoldersPanelSort (int): 1
noteSubfoldersPanelTabsUnsetAllNotesSelection (bool): false
notesPanelOrder (int): 1
notesPanelSort (int): 1
notesPath (QString): C:/Users/Work/Notes
notifyAllExternalModifications (bool): false
overrideInterfaceFontSize (bool): false
ownCloud/supportEnabled (bool): false
ownCloud/todoCalendarBackend (int): 3
ownCloud/todoCalendarCalDAVPassword (QString): <hidden>
ownCloud/todoCalendarCalDAVServerUrl (QString): empty
ownCloud/todoCalendarCalDAVUsername (QString): empty
ownCloud/todoCalendarCloudConnectionId (int): 1
ownCloud/todoCalendarDisplayNameList (QStringList): empty
ownCloud/todoCalendarEnabledList (QStringList): empty
ownCloud/todoCalendarEnabledUrlList (QStringList): empty
ownCloud/todoCalendarUrlList (QStringList): empty
ownCloudInfo/appIsValid (bool): false
ownCloudInfo/connectionErrorMessage (QString): empty
ownCloudInfo/notesPathExistsText (QString): empty
ownCloudInfo/serverVersion (QString): empty
previousWorkspace (QString): fea5ce9c-2766-4747-b4af-ee2ec7031de6
restoreCursorPosition (bool): true
restoreLastNoteAtStartup (bool): true
restoreNoteTabs (bool): true
savedSearches/noteFolder-1 (QStringList): REMOVED
showMatches (bool): true
showMenuBar (bool): true
showStatusBar (bool): true
showStatusBarNotePath (bool): true
showStatusBarRelativeNotePath (bool): false
spellCheckLanguage (QString): en_US
startInReadOnlyMode (bool): false
systemIconTheme (bool): false
tagWasAddedToNote (QString): true
taggingShowNotesRecursively (bool): false
tagsPanelHideNoteCount (bool): false
tagsPanelHideSearch (bool): false
tagsPanelOrder (int): 0
tagsPanelSort (int): 0
todoCalendarSupport (bool): true
toolbar/1/items (QStringList): actionFormat_text_bold, actionFormat_text_italic, actionStrike_out_text, actionInsert_code_block, actionInsert_block_quote
toolbar/1/name (QString): formattingToolbar
toolbar/1/title (QString): formatting toolbar
toolbar/2/items (QStringList): actionInsert_text_link, actionInsert_image, actionInsert_current_time
toolbar/2/name (QString): insertingToolbar
toolbar/2/title (QString): inserting toolbar
toolbar/3/items (QStringList): action_Encrypt_note, actionEdit_encrypted_note, actionDecrypt_note
toolbar/3/name (QString): encryptionToolbar
toolbar/3/title (QString): encryption toolbar
toolbar/4/items (QStringList): actionEnable_AI, actionAiBackendComboBox, actionAiModelComboBox
toolbar/4/name (QString): aiToolbar
toolbar/4/title (QString): AI toolbar
toolbar/5/items (QStringList): actionWorkspaceComboBox, actionStore_as_new_workspace, actionRemove_current_workspace, actionRename_current_workspace, actionSwitch_to_previous_workspace, actionUnlock_panels, , actionToggle_distraction_free_mode, action_Increase_note_text_size, action_Decrease_note_text_size, action_Reset_note_text_size
toolbar/5/name (QString): windowToolbar
toolbar/5/title (QString): window toolbar
toolbar/6/items (QStringList): action_Quit
toolbar/6/name (QString): quitToolbar
toolbar/6/title (QString): quit toolbar
toolbar/7/items (QStringList): action_Quit
toolbar/7/name (QString): quitToolbar
toolbar/7/title (QString): quit toolbar
toolbar/size (int): 7
useNoteFolderButtons (bool): false
useUNIXNewline (bool): false
webAppClientService/serverUrl (QString): wss://app.qownnotes.org
webAppClientService/token (QString): <hidden>
webSocketServerService/bookmarksNoteName (QString): empty
webSocketServerService/bookmarksTag (QString): bookmarks
webSocketServerService/commandSnippetsNoteName (QString): Commands
webSocketServerService/commandSnippetsTag (QString): commands
webSocketServerService/port (int): 22222
workspace-fea5ce9c-2766-4747-b4af-ee2ec7031de6/name (QString): Preview
workspace-fea5ce9c-2766-4747-b4af-ee2ec7031de6/noteSubFolderDockWidgetVisible (bool): true
workspace-fea5ce9c-2766-4747-b4af-ee2ec7031de6/windowState (QByteArray): <binary data>
workspace-initial/name (QString): Минимальный
workspace-initial/noteSubFolderDockWidgetVisible (bool): true
workspace-initial/windowState (QByteArray): <binary data>
workspaces (QStringList): initial, fea5ce9c-2766-4747-b4af-ee2ec7031de6

System environment

ALLUSERSPROFILE: C:\ProgramData
APPDATA: C:\Users\Work\AppData\Roaming
asl.log: Destination=file
BONJOUR_SDK_HOME: C:\Program Files\Bonjour SDK\
CommonProgramFiles: C:\Program Files\Common Files
CommonProgramFiles(x86): C:\Program Files (x86)\Common Files
CommonProgramW6432: C:\Program Files\Common Files
COMPUTERNAME: REMOVED
ComSpec: C:\WINDOWS\system32\cmd.exe
DriverData: C:\Windows\System32\Drivers\DriverData
FPS_BROWSER_APP_PROFILE_STRING: Internet Explorer
FPS_BROWSER_USER_PROFILE_STRING: Default
HOMEDRIVE: C:
HOMEPATH: \Users\Work
LOCALAPPDATA: C:\Users\Work\AppData\Local
LOGONSERVER: REMOVED
NUMBER_OF_PROCESSORS: 8
OneDrive: C:\Users\Work\OneDrive
OS: Windows_NT
Path: REMOVED
PATHEXT: .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE: AMD64
PROCESSOR_IDENTIFIER: Intel64 Family 6 Model 58 Stepping 9, GenuineIntel
PROCESSOR_LEVEL: 6
PROCESSOR_REVISION: 3a09
ProgramData: C:\ProgramData
ProgramFiles: C:\Program Files
ProgramFiles(x86): C:\Program Files (x86)
ProgramW6432: C:\Program Files
PSModulePath: C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
PT8HOME: C:\Program Files\Cisco Packet Tracer 8.0
PUBLIC: C:\Users\Public
QT_DEVICE_PIXEL_RATIO: auto
SESSIONNAME: Console
SystemDrive: C:
SystemRoot: C:\WINDOWS
TEMP: C:\Users\Work\AppData\Local\Temp
TMP: C:\Users\Work\AppData\Local\Temp
USERDOMAIN: REMOVED
USERDOMAIN_ROAMINGPROFILE: REMOVED
USERNAME: Work
USERPROFILE: C:\Users\Work
VBOX_MSI_INSTALL_PATH: C:\Program Files\Oracle\VirtualBox\
VS140COMNTOOLS: I:\InstalledProgramms\VisualStudio\Common7\Tools\
windir: C:\WINDOWS

@pbek
Copy link
Owner

pbek commented Jan 26, 2025

Those links are supposed to be url-encoded. Did you write them yourself or used the insert image dialog?

@Leopold702
Copy link
Author

I used the "Insert image" dialog, as shown on this screenshot:

Image

@pbek
Copy link
Owner

pbek commented Jan 27, 2025

Thank you, I need to look into that more.

@pbek pbek added Type: Bug Severity: Low Bugs or breaking changes with low impact Info: Might introduce regressions and removed Type: Support labels Jan 27, 2025
pbek added a commit that referenced this issue Jan 29, 2025
…using them in notes and allow management dialogs to recognize them

Signed-off-by: Patrizio Bekerle <patrizio@bekerle.com>
@pbek
Copy link
Owner

pbek commented Jan 29, 2025

25.1.7

  • When inserting an image or attachment file via their insert dialogs or via
    drag and drop the filenames will now be urlencoded to prevent problems with
    special characters in the filenames (for #3215)
    • The management dialogs for images and attachments can now also recognize
      urlencoded filenames to show the files correctly

@pbek
Copy link
Owner

pbek commented Jan 29, 2025

There now is a new release, could you please test it and report if it works for you?

@Leopold702
Copy link
Author

Yes, now filename of an image that has parentheses gets URL-encoded and correctly detected by image manager. Thank you for the quick fix!

@pbek
Copy link
Owner

pbek commented Jan 31, 2025

Great, thank you for testing!

@pbek pbek closed this as completed Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants