Skip to content

Commit

Permalink
improved Entities code
Browse files Browse the repository at this point in the history
  • Loading branch information
URUWorks committed Sep 1, 2023
1 parent 2d818c3 commit 0caa03f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions TeroSubtitler/subtitleapi/UWSubtitleAPI.Utils.pas
Expand Up @@ -84,7 +84,7 @@ procedure XMLToStrings(const XmlDoc: TXMLDocument; const StringList: TUWStringLi
Stream.Position := 0;

if ReplaceEntities then
StringList.Text := HTMLDecode(Stream.DataString) //HTMLReplaceEntities(Stream.DataString)
StringList.Text := StrToXMLValue(Stream.DataString) //HTMLDecode(Stream.DataString) //HTMLReplaceEntities(Stream.DataString)
else
StringList.Text := Stream.DataString;
finally
Expand Down Expand Up @@ -183,7 +183,7 @@ function XMLExtractTextContent(const A: TDOMNodeList): String;
for I := 0 to A.Count-1 do
Result := Result + DOMNodeToString(A[I]);

Result := XMLTagsToTS(Result);
Result := XMLTagsToTS(XMLValueToStr(Result));
end;

// -----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion TeroSubtitler/subtitleapi/UWSubtitleAPI.pas
Expand Up @@ -766,7 +766,7 @@ constructor TUWSubtitles.Create;
FSearchSkip := 0;
FHeader := NIL;
FAutoSort := True;
FReplaceEntity := True;
FReplaceEntity := False;
FTag := 0;
FTimeBase := stbMedia;
New(FFormatProperties);
Expand Down

0 comments on commit 0caa03f

Please sign in to comment.