kbwbe / A2plus

Another assembly workbench for FreeCAD, following and extending Hamish's Assembly 2 workbench
GNU Lesser General Public License v2.1
168 stars 69 forks source link

Generated parts list contain HTML codes #609

Closed glassondesignstudio closed 9 months ago

glassondesignstudio commented 10 months ago

I have been using the Parts List features for a little while and recently noticed that part information created very recently contains HTML ' codes whereas older files don't contain those codes. The screen shot below shows the issue. The two entries at the top of the parts list were created around six months ago while the part information for bottom two entries were created about six weeks ago. In terms of FreeCAD versions I think the last two were created around about the time 0.21.0 or 0.21.1 came out (but don't quote me on that).

image

I would like to submit a patch for your consideration. The patch uses a regular expression to remove the unwanted HTML codes. Please note that regular expressions are not my strong suit and I used the solution that I found on stackoverflow.

a2p_Bom_py.txt

glassondesignstudio commented 10 months ago

Forgot to add other important info...

OS: KDE Flatpak runtime (KDE/plasma) Word size of FreeCAD: 64-bit Version: 0.21.1.33694 (Git) Build type: Release Branch: (HEAD detached at f670854) Hash: f6708547a9bb3f71a4aaade12109f511a72c207c Python 3.10.12, Qt 5.15.10, Coin 4.0.0, Vtk 8.2.0, OCC 7.6.3 Locale: English/Australia (en_AU) Installed mods:

kbwbe commented 10 months ago

Hi, thank you for the patch. As i am also no expert for regular expressions, i added code which removes the ' html sequence. At moment, this apos hml sequence seems to make most trouble. the new A2p version is 0.4.61

glassondesignstudio commented 9 months ago

That seems to be working now. Thanks.