https://bugs.kde.org/show_bug.cgi?id=475765

Jasem Mutlaq <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|                            |https://invent.kde.org/educ
                   |                            |ation/kstars/-/commit/03b72
                   |                            |687d12dc9a3863a600580b0fae8
                   |                            |8bb84081
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Jasem Mutlaq <[email protected]> ---
Git commit 03b72687d12dc9a3863a600580b0fae88bb84081 by Jasem Mutlaq, on behalf
of madhur dhillon.
Committed on 22/11/2026 at 11:48.
Pushed by mutlaqja into branch 'master'.

FITS Viewer: Fix header values and comments truncated at slash characters

Previously, FITSData::parseHeader used
record.split(QRegularExpression("[=/]")),
which erroneously split header records at slash ('/') characters, truncating
string values (e.g. 'string w/ a slash' became 'string w') and comments
containing slashes.

Replace regex splitting with standard CFITSIO functions fits_get_keyname()
and fits_parse_value(). These functions correctly extract keyword names,
values, and comments according to the FITS standard, safely preserving slashes
and quotes within string literals and comments while preserving numeric type
conversion for Integer and Double values.

Add testHeaderWithSlashes() in testfitsdata to verify parsing of cards with
slashes in values, comments, and both.

M  +4    -0    Tests/fitsviewer/CMakeLists.txt
A  +-    --    Tests/fitsviewer/header_with_slashes.fits
M  +50   -0    Tests/fitsviewer/testfitsdata.cpp
M  +1    -0    Tests/fitsviewer/testfitsdata.h
M  +48   -31   kstars/fitsviewer/fitsdata.cpp

https://invent.kde.org/education/kstars/-/commit/03b72687d12dc9a3863a600580b0fae88bb84081

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to