The wrong code path was chosen because the code determined that the BODY
already contains an existing paragraph on the end of the content. The
fix it to not take the credits element into account when determining if the
BODY already contains the paragraphs.
Don't save the selection again in
e_editor_dom_fix_structure_after_delete_before_quoted_content() as later
the selection markers are not used to restore the selection, but they
would prevent the delete operation to process correctly.
Also restore the selection on other places when we are not using it
anymore.
WebKitDOMHTMLCollection is a live list, so we can't process it like a static
list (like WebKitDOMNodeList). So process it correctly and while fixing it
rework the WebKitODMNodeList processing so we can get rid of the length
variable.
webkit:editor - things associated with EWebKitContentEditor
webkit:undo - things associated with undo and redo handling in EWebKitContentEditor
webkit:preview - things associated with message preview, printing, ...
webkit - things mentioned above together
When parsing the HTML content to blocks we cannot look for the first "<br>"
token from the first position of input as when the input will start with the
same token, then we will later exit the processing loop prematurely as we won't
have a non-empty content to process.
When doing reply don't forgot to turn off spell checking if it is disabled.
Also remove a code that was accidentally committed that was preventing the spell
check to perform.
We were not inserting the citation start marker in parse_html_into_blocks() when
it was after the text to process and the line did not started with BR element.
Only the citation end mark was inserted in this case, thus the citation was not
constructed properly.
While working on the WK2 port I decided to use P element for 'Normal' block
instead of DIV element. Now, it showed up that it was not a wise change as the
P element usually has some style defined by the web engine itself (usually
margins above and below) so the HTML message written in the Evolution's composer
won't look the same in other MUAs and actually not in the Evolution's preview as
well. Instead of adding some style attributes to every 'Normal' paragraph that
is being send basically revert the change and return back to DIV elements.
When saving the selection, only append the selection end mark to the end of the
container if the following statements are met:
* container is not text
* the offset is not 0 (that would be when the selection starts/end in the
beginning of node)
* offset is bigger by one than the count of the container's children that are
elements
For more see https://developer.mozilla.org/en-US/docs/Web/API/Range/endOffset
In the next cycle we really need to simplify the logic inside the
e_editor_dom_selection_save()..
When a Mail-only Google account had been created in the Evolution,
it had set Plain password authentication, which requires an application
specific password, while an OAuth2 could be used instead.
The evolution could crash when replying to an HTML message inside pcre
library recursion, which could cause stack overflow.
This had been reported downstream at:
https://bugzilla.redhat.com/show_bug.cgi?id=1370514
Don't use the regular expression that we used before - it's wrong as it will
also apply on PRE elements and we don't want that. When generating the plain
text version of the editor's content skip all the text nodes with '\n' content
when their parent is not a PRE element. Also remove the BR element (if
presented) from the current element when inserting a HTML content otherwise an
extra new block will be inserted.
This function moves a current block in quoted content one level up, but only
when the caret is in the beginning of block. For HTML we were really not
checking that and we were just looking whether the current block is indeed a
citation element.
We have to remove the SPAN element that is used to notify us that we need to
quote the BODY content, otherwise it will cause an unwanted line break on the
end of the content.
When the caret is on the end of the citation and the Return key is pressed then
a new empty block is inserted after the current block in citation. When we later
try to undo this operation the newly added block will be removed as it should,
but the next block would be concatenated after the current citation.
In case the meeting invitation component doesn't contain its timezone(s),
try to guess it from the given TZID, thus the time shown in the message
preview is properly converted into the local time zone.
There was not much error reporting when calling anything through D-Bus
to a WebExtension, but the failed calls could cause misbehavior.
The added warnings on console will help to spot such issues and
fix them.